Hello,
I have used your product generating a PDF that also contains images of random size that must be distributed at 2 images per page. Too small and too large images must be resized to fill a half page.
I used the SetBounds method for that and that really works fine.
Recently I found some images that did not display and after investigating into the problem I found that these images do not contain DPI information. After loading these images the VerticalDpi and HorizontalDpi have the value 0 and the ScaleX and ScaleY properties return NAN. So that was the problem.
However, changing the loaded image by assigning the value of 72 to the HorizontalDpi and VerticalDpi properties, still results in a problem when using SetBounds() after this change. It seems that SetBounds again tries to read the dpi information from the ImageData class and these are read-only and therefore still 0.
Is this a bug? Can you advise me how to work around this problem?
Changing the JPG images by adding dpi info is no option because the user supplies them.
Thanks,
Hans
Image.SetBounds()
Re: Image.SetBounds()
Support · Feb 18, 2008Hello Hans,
Can you try sending one of the images with 0 dpi to our [^a|mailto:support@cete.com|Support Team^] so that they can do some testing and figure out what exactly is going on?
Thanks,
ceTe Software Support Team
Re: Image.SetBounds()
Forum member · Feb 18, 2008Ok, I will send you one of the images.
I have found a workaround already myself by not using a scaling function but calculate a scaling factor myself from the ImageData.Width and ImageData.Height.
After that I set the Image.Width and Image.Height accordingly.
This seems to work fine.
But it would be better if I could set a dpi in the image.