Hello All,
I am using image magick 6.6.6 version for my VC++ application. In this application i am loading image (with 1920X1080 dimensions) and increasing image size with 25% zoom.
It takes 953 milli seconds per 25% zoom, 1500 milli seconds per 50% zoom and 2344 milli seconds per 75% zoom and increasing when size increases.
code for this is:
Code: Select all
Geometry tNailSize( szx, szy );
tNailSize.aspect(true);
m_Image.filterType(CatromFilter);
m_Image.zoom(tNailSize);
If i am using "scale" method to zoom the time reduces but after several zoomin and zoomouts the quality of image reduced.
Code: Select all
Geometry tNailSize( szx, szy );
tNailSize.aspect(true);
m_Image.scale(tNailSize);
I want to get the same performance of the zoom with the "Zoom" method.
How can i reduce the time taking for zoom in the first case?
Can any one help me to reduce time for zoom image without loosing image quality?
Thanking you advance..
Reduce time for zoom image without loosing image quality..
Re: Reduce time for zoom image without loosing image quality
Hello All,
I am loosing quality of image even if i use filters.
I used the "CatromFilter" to increase the size of the image as follows
and to reduce size i am using ""LanczosFilter" filter as follows.
In these two caseses if do zoomin and zoomout several times (say >25) times i am getting distorted/blured image.
My application need to do more zoomin and zoomout operations.
Can you please help me what to do to get exact image?
Thanks in Advance.
I am loosing quality of image even if i use filters.
I used the "CatromFilter" to increase the size of the image as follows
Code: Select all
Geometry tNailSize( szx, szy );
tNailSize.aspect(aspect);
m_Image.density("1550X1550");
m_Image.filterType(CatromFilter);
m_Image.zoom(tNailSize);
Code: Select all
Geometry tNailSize( szx, szy );
tNailSize.aspect(aspect);
m_Image.density("1550X1550");
m_Image.filterType(LanczosFilter);
m_Image.zoom(tNailSize);
My application need to do more zoomin and zoomout operations.
Can you please help me what to do to get exact image?
Thanks in Advance.
- foxyshadis
- Posts: 15
- Joined: 2010-04-29T19:29:46-07:00
- Authentication code: 8675308
- Location: Fresno, California
Re: Reduce time for zoom image without loosing image quality
Many zooms in and out will always give you distortion. That's just how it works. Why on earth would you expect it to look good when you throw away 50-90% of the information and then try to regenerate it with an algorithm, 25 times in a row? That's unrealistic.
If you can perform any kind of windowing or cropping prior to the resize, do so. Working with gigantic images is slow, so remove as many pixels as possible to cut down on processing times; you could even try bilinear resize. If multithreading isn't working, try segmenting the image and processing in parallel at a higher level. Also, using lanczos to downscale will probably result in less-pleasing images, because it tends to alias more the smaller you go.
If you can perform any kind of windowing or cropping prior to the resize, do so. Working with gigantic images is slow, so remove as many pixels as possible to cut down on processing times; you could even try bilinear resize. If multithreading isn't working, try segmenting the image and processing in parallel at a higher level. Also, using lanczos to downscale will probably result in less-pleasing images, because it tends to alias more the smaller you go.
Re: Reduce time for zoom image without loosing image quality
Thanks for the help,
I solved my problem in another way. Zoomin the original image with out altering.
Regards
Sri
I solved my problem in another way. Zoomin the original image with out altering.
Regards
Sri