Re: SOS
Started by Ahhh at 11-07-2007 2:46. Topic has 9 replies.
|
|
11-07-2007, 2:46
|
Ahhh
Joined on 11-07-2007
Posts 8
|
|
|
Hi,
I have a problem.
I used L_PaintDC for zooming image, but when I zoom in, the image quality is not so good.
If I use L_ResizeBitmap, the image quality is getting better. But I have to use L_PaintDC for low memory, better speend and more importantly to use clipping function.
|
|
|
|
|
Report
|
|
|
|
11-08-2007, 11:27
|
Adam Boulad

Joined on 09-16-2007
Posts 513
|
|
|
Hello, Before calling L_PaintDC, you can change the
scaling options used during painting. To do that, use the L_SetDisplayMode function
and enable either DISPLAYMODE_RESAMPLE or DISPLAYMODE_BICUBIC to improve the
painting properties.
Adam Boulad LEADTOOLS Technical Support
|
|
|
|
|
Report
|
|
|
|
11-08-2007, 20:26
|
Ahhh
Joined on 11-07-2007
Posts 8
|
|
|
Thank you.
But I'm not sure that the image quality is equal as before when I set DISPLAYMODE_RESAMPLE.
Thank you very much if you explain about it in detail. Espicially the difference between L_SizeBitmap with DISPLAYMODE_BICUBIC and L_PaintDC with DISPLAYODE_BICUBIC.
Regards.
|
|
|
|
|
Report
|
|
|
|
11-09-2007, 14:14
|
GregR

Joined on 05-31-2006
In House
Posts 1,717
|
|
|
L_SizeBitmap is physically changing the bitmap using the bicubic algorithm. If you resize the bitmap without Bicubic I'm sure you will notice that the quality isn't as good, especially when enlarging the image.
L_PaintDC is not physically altering the bitmap, just changing the display rectangles. However, it uses the same interpolation algorithm (Bicubic or resample or none) to make the image look crisper, especially when zooming in. The bicubic and resample algorithms have the same concept as anti-aliasing where it smooths out pixelated images. This is why these make a big difference when either making a bitmap physically larger or when zooming in.
Greg Ross LEADTOOLS Technical Support
|
|
|
|
|
Report
|
|
|
|
11-10-2007, 2:41
|
Ahhh
Joined on 11-07-2007
Posts 8
|
|
|
Thank you.
So you mean that I can't get better quality if I don't use L_SizeBitmap?
If I use L_SizeBitmap, the image is flick.
Which one I have to select to get better quality?
Is it L_SizeBitmap or L_SetDisplayMode?
I'll wait your answer.
Regard.
|
|
|
|
|
Report
|
|
|
|
11-12-2007, 8:35
|
GregR

Joined on 05-31-2006
In House
Posts 1,717
|
|
|
No, using L_SizeBitmap or L_SetDisplayMode should both improve the quality of the display. The only difference is that L_SizeBitmap physically alters the bitmap while L_SetDisplayMode only affects the painting of the bitmap. Most likely, the image is flickering due to the added processing time needed for resizing the bitmap.
Are you saying that there is no visible differnce when the image is zoomed in and you use bicubic for the display mode? If that is the case, then you are either not zoomed in close enough to notice or you are not using the function properly. Try loading the same image in the main demo and zooming in on it past 100%. Then go to Preferences -> Paint Scaling and choose Normal, Bicubic, and Resample and notice the differences. If you are noticing the difference, then I would take a look at the code in that demo to compare how you are using the function.
Greg Ross LEADTOOLS Technical Support
|
|
|
|
|
Report
|
|
|
|
11-12-2007, 11:21
|
Ahhh
Joined on 11-07-2007
Posts 8
|
|
|
Thank you for replying all the questions.
But I didn't understand about it yet.
Here are two bitmaps.
One is using L_SetDisplayMode and another is using L_SizeBitmap.
Which flag do I set to get equal quality with using L_SetDisplayMode?
Regard.
|
|
|
|
|
Report
|
|
|
|
11-13-2007, 11:20
|
GregR

Joined on 05-31-2006
In House
Posts 1,717
|
|
|
|
Were you trying to attach something? If you are attaching a project or file to the forums...
1.) Zip the file(s) up.
2.) Make sure it is less than 5 MB. If it is larger, please send an email to support@leadtools.com or give us your email address and we'll send you FTP instructions.
3.) Remove ANY AND ALL unlock codes and LEADTOOLS DLLs.
4.) Do not click the preview button, the attachment will not show up when you post it.
If you do not wish to post your file(s) on the forum since they are publically viewable, please send an email to support@leadtools.com and make sure that you include a link to this forum post. L_SizeBitmap and L_SetDisplayMode use the same flags, either bicubic or Resample, it's really the same operation except that one is being applied to the entire bitmap as it gets physically resized and the other is only getting executed on the currently displayed DC. It's probably not going to be possible to have the EXACT same results since one modifies the bitmap and the other doesn't. When you run the same algorithm on different bitmaps, you're going to have a different result.
Greg Ross LEADTOOLS Technical Support
|
|
|
|
|
Report
|
|
|
|
11-30-2007, 10:43
|
Ahhh
Joined on 11-07-2007
Posts 8
|
|
|
Thank you for helping me.
I had another work to do and didn't see this message. Sorry.
This file is an simple program that shows difference.
I changed "InterpolationView.cpp" only.
I marked up the added codes with line comment.
Please giving me help.
Best regards.
|
|
|
|
|
Report
|
|
|
|
12-03-2007, 11:14
|
GregR

Joined on 05-31-2006
In House
Posts 1,717
|
|
|
I got your email as well, so I'm giving you the same answer.
This is not a bug and I'm afraid that this will be the best you can get. Like I said in my previous post...it's the same operation, but used on different bitmaps. Therefore, you cannot expect the EXACT same result with both. The bicubic algorithm is the same operation, but it's being used in different contexts on different bitmaps, thus creating a different result. I apologize if I was not more clear in explaining this.
Greg Ross LEADTOOLS Technical Support
|
|
|
|
|
Report
|
|
|
|
|
LEAD Support Fo... » General » Support Site Su... » Re: SOS
|
|
Copyright LEAD Technologies, Inc. 2008
