LEADTOOLS Support
Imaging
Imaging SDK Questions
RasterImageViewer shows up distorted image when uploaded
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Wednesday, May 29, 2013 7:03:58 AM(UTC)
Groups: Registered
Posts: 4
Hi,
I have a jpeg image when uploaded shows up a distorted blurry image. I guess something is wrong with the scaling factor, but not sure exactly.
When i try the same image in you sample demo program VBMainDemo_x64_2010, it seems to work fine.
Please find the attached file for the code and image file that I am using.
Could you please let me know what am i missing and what exactly needs to be done. Any suggestion would be greatly appreciated.
Thanks
Divya
#2
Posted
:
Thursday, May 30, 2013 6:18:48 AM(UTC)
Groups: Registered
Posts: 256
Try adding the following code:
=================
Dim pp As Leadtools.Drawing.RasterPaintProperties = viewer.PaintProperties
pp.PaintDisplayMode = pp.PaintDisplayMode Or Drawing.RasterPaintDisplayModeFlags.Resample
viewer.PaintProperties = pp
=================
This will fix the issue. Please note that paint properties will take effect if there is zooming on the image (this also include fitting the image to the viewer).
#3
Posted
:
Saturday, June 1, 2013 6:39:33 AM(UTC)
Groups: Registered
Posts: 23
Hi,
Can I use the same code for WPF application?
I can't find this property. Is there any other alternative?
Thanks for help.
#4
Posted
:
Sunday, June 2, 2013 6:22:35 AM(UTC)
Groups: Registered, Tech Support
Posts: 1,326
Was thanked: 1 time(s) in 1 post(s)
Using "BitmapScalingMode" flags will produce a close results. Using the following line of code will produce a close image paint:
==============
RenderOptions.SetBitmapScalingMode(Viewer, BitmapScalingMode.HighQuality);
==============
Thanks,
Maen Badwan
LEADTOOLS Technical Support
LEADTOOLS Support
Imaging
Imaging SDK Questions
RasterImageViewer shows up distorted image when uploaded
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.