Re: Setting resolution of exported images from VB



Steve Rindsberg wrote:

Hi Steve.
I have not inserted the code because it is the standard code used for
export a slide as Jpeg that I found in the PPTools. FAQ section.

The needed bit should only be a few lines. Pop it in here so we can have a look
if you would. Thanks.
The code I used for the test
Set PPApp = CreateObject("PowerPoint.Application")
If PPApp Is Nothing Then Exit Sub

PPApp.Visible = True
Set PPpres = PPApp.Presentations.Open(sFile, True, , False)
If PPpres Is Nothing Then
PPApp.Quit
Exit Sub
End If

PPpres.Slides(SlideIndex).Export ImageFile, "jpg", ImageWidth,
ImageHeight

PPpres.close
PPApp.Quit


I use the .Export method where I can specify the slide height and width
in pixels but not the dot-per-inch resolution. Using PowerPoint
Application you can specify the resolution by a register but it doesn't
work with the .Export method.

I searched for a specific property for this task but I was not able to
find it

There's no specific property for DPI because it's rather meaningless.
How have you determined that it doesn't work?
If you're opening the images in an image editor and it's telling you 72dpi, that's
incorrect information, most probably.

If you're asking for an image that's, say, 2000 pixels wide, are you getting that
many pixels? If so, it's working as it should.

If you have a look at this article
http://support.microsoft.com/default.aspx?scid=kb;en-us;827745 you can
see that the maximum value is 307 dpi.
In any case, I checked the produced images with Adobe Photoshop and I
analyzed the JFIF file using a hex editor.

I found a work around that I don't like but it works: I change the dpi
resolution directly on the JFIF file.

I always searching for a solution using PPT activeX.

Regards,
Mario

.



Relevant Pages

  • Re: Scanned Documents Too Big/Epson Perfection 1260 Scanner
    ... size, but the dimensions of that size is in pixels, not in inches. ... Paper is dimensioned in inches. ... dimensioned only in pixels, image files generally do contain a dpi value, ... often the scanning resolution by default. ...
    (comp.periphs.scanners)
  • Re: Archival Scanning
    ... I have heard that 300 dpi is the desired output but the ... The only suggestion I would make would be to reconsider the resolution for your negatives, depending on how particular you want to be and the equipment available to you. ... Negatives will contain more intrinsic information than any of the other image sources available and it is a reasonable assumption that the scanner itself will limit just how much of that information you can capture. ... Also, remember that the scanner's quoted resolution is just its sample density, the smallest step between image pixels, and it may not be able to optically resolve 1/2400th of an inch, possible as little as half of that in practice, depending on the scanner. ...
    (comp.periphs.scanners)
  • Re: Youre Help/Advice Please re Scanner for Slides and Negatives
    ... If you have pixels spaced 1/4,800th of an inch apart (that's what 4800 dpi means), you can use every pixel, or every other pixel. ... There are no resolution choices in between 2,400 dpi and 4,800 dpi that don't use interpolated pixels. ... More can be helpful in certain situations involving slides with really dark areas that are still discernable as not being solid black, but the benefit is marginal and usually of interest only to professionals. ...
    (comp.periphs.scanners)
  • Re: Find the resolution of images
    ... I sent you ther way to find the correct resolution. ... resolution of images is less than 300 DPI or not. ... Dim MyImage As System.Drawing.Image = Nothing ... 'Target Pixels of the image to have 300 DPI ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: image processor..
    ... whatever rez you specify and reprocesses for itself. ... submission thing and specify specifically what "dpi" they want, ... it's really about pixels but sometimes they have ... That doesn't change the fact that resolution does ...
    (comp.graphics.apps.photoshop)

Quantcast