Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Thursday, April 6, 2006 2:50:58 PM(UTC)
PatriciaT

Groups: Registered
Posts: 2


I'm trying to resize an image to a standard photo size. When the image size is not too big (less than 2000kB), the BitmapXres / BitmapYRes returns the correct DPI so I end up with the correct size and resolution.

However, when the file is large (say more than 4500kB), the BitmapXres / BitmapYres return 72 - which is the default DPI. My picture ends up to be very fuzzy since the original DPI was 300.

Does anyone know how to solve this ?

This is my code snippet:

 lQuality = GetCompressionQuality(g_oAppSettings.CompressionQuality)
    
    Lead1.Load sOriginalFile, 0, 0, 1
   
    If bResize Then
       If ParseImageSize(lHeight, lWidth, g_oAppSettings.ImageSize) Then
            'convert to pixels
            lWidth = lWidth * Lead1.BitmapXRes
            lHeight = lHeight * Lead1.BitmapYRes
            Lead1.Size lWidth, lHeight, RESIZE_FAVORBLACK_OR_BICUBIC
        End If
    End If

Thanks !!!

 

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Monday, April 10, 2006 10:56:35 AM(UTC)

Amin  
Amin

Groups: Manager, Tech Support
Posts: 353


Patricia,
To try to identify the source of image quality loss, it would help if I could get the following from you:
1. A sample source image before resizing.
2. The actual values of lWidth and lHeight you pass to the Size method in your code above.

If you want to post an image here, please put it in a ZIP file first. Alternatively, you could send it to support@leadtools.com
Amin Dodin

Senior Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 
#3 Posted : Wednesday, April 12, 2006 7:14:07 AM(UTC)
PatriciaT

Groups: Registered
Posts: 2


1/. Attached is a zip file of the image

2/. lWidth = 6, lHeight = 4 (in inches)

 

Thank you,

 

Patricia

 

 
#4 Posted : Sunday, April 16, 2006 8:56:36 PM(UTC)

Amin  
Amin

Groups: Manager, Tech Support
Posts: 353


Patricia,

There doesn't seem to be an attachment with the post. One user in the
past reported losing the attachment when using the 'Preview' button, which might be what happened to you.
Could you please post the ZIP attachment again or send it to support@LEADTOOLS.com?

Amin Dodin

Senior Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 
#5 Posted : Thursday, April 20, 2006 4:38:32 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,328

Was thanked: 1 time(s) in 1 post(s)

Hello Patricia,
 
I received your image that you sent to our support department and checked it. I noticed the following:
The file contains the following exif tags:
XResolutin (tag code = 0x011A), value = 0x48/0x01, which is 72
YResolutin (tag code = 0x011B), value = 0x48/0x01, which is 72

This means if any program opens it and does not read the correct tag value, it's a problem in that program.
Other than LEADTOOLS, I checked using Adobe Photoshop and it reads the correct values of 72DPI also.

Please keep me up to date of the status of this issue on your end.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2019, Yet Another Forum.NET
This page was generated in 0.136 seconds.