This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Friday, July 2, 2010 2:41:38 AM(UTC)
Groups: Registered
Posts: 3
please see attached image
i want to cut image using left top with some width and height,
I am using trim it is going good, i got desired region
Problem
when i resize an image using size function, it gets me image having bad quality.
-------------------------------------------------
code
-------------------------------------------------
Set LEADRasterView1 = Server.CreateObject("LEADRasterView.LEADRasterView")
Set RasterIO = Server.CreateObject("LEADRasterIO.LEADRasterIO")
set RasterProc = Server.CreateObject("LEADRasterProcess.LEADRasterProcess")
RasterIO.Load LEADRasterView1.Raster, source_file, 0, 0, 1
X1=439
Y1=0
W=223
H=149
RasterProc.Trim LEADRasterView1.Raster, X1, Y1, W, H
target_width=124
target_height=83
RasterProc.Size LEADRasterView1.Raster, target_width, target_height, 0
call RasterIO.Save(LEADRasterView1.Raster, target2, 21, 0, 5, 0)
-------------------------------------------------
Regards
Humair
#2
Posted
:
Friday, July 2, 2010 2:49:58 AM(UTC)
Groups: Registered
Posts: 3
attachment is not displaying
so i upload a file here you can check and test from here
http://www.coroflot.com/images/samplefileleadtools.gif
another is, problem is mostly i am getting from GIF file quality of jpeg fils are much better than GIF.
Please check and give reply
#3
Posted
:
Friday, July 2, 2010 3:11:40 AM(UTC)
Groups: Registered
Posts: 3
i am using version 14.5 of leadtools
#4
Posted
:
Friday, July 2, 2010 6:55:56 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
Attached is the result I got when I used the Size method call. The last parameter I passed was 4, which means I want to do a bicubic resize. Bicubic resize will give you the best quality. So your method call should be like this:
RasterProc.Size LEADRasterView1.Raster,
target_width, target_height, 4
Guest attached the following image(s):
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.