Magento resize with gd2 bad image - magento

i have problems to obtain good thumb from some images, when the original images are striped or checked shirt.
With the magento's gd2 library resize() in Varien_Image_Adapter_Gd2 class (magento 1.5 version) i obtain an image with a strange effect that modify the aspect of real image.
I can't find the name of this effect, so i can't search this issue on google! :(
You can see my issue in these 2 images:
As you can see, on the thumb image there are some rolling strange lines in particular in top-left position.
The issue is more evident on checked shirt, so i have to find a solution to correct this.
If anyone have some tips on this issue, please said me! :)
thx
Luca

'Moire' is the pattern you describe and it is particularly visible due to use of 'gd2' library which may or may not use bicubic scaling.
I am not sure that #Guerra has understood the problem here, but, to me, it is a straightforward lack of bicubic (or better) scaling.
See the answer on this question and follow the link:
https://stackoverflow.com/a/255666/1617149
So you may want to scale your images for the frontend using imagemagick instead of the standard gd2 library that comes with Magento and use a filter.
You can run imagemagick through php (the proper way), or, if you have complicated image processing on the go, you can go commandline 'exec' and prototype your image processing that way. I don't have any ready-to-roll code for that, however, that is what you need: better thumbnail rendering than you get with gd2.

Try use cloudzoom, he autosize your images to fit on your needs.
http://ecommerce-team.com/cloud-zoom.html

Related

Identify logos on PNG without AI Services

So, I don't believe that exists someway to "read" a PNG through its binary code, or something like that, but I have zero knowledge on Image Processing or Computer Vision, and so, I can't be sure if that are ways to do it or not.
To be clear: I want to know if there are ways to identify the image of a Logo using an image of the Logo as reference but through methods that use only the binary of the image.
Thanks in advance
If the logo is known, and not distorted a lot (logo printed on a scarf is not as good as on a flat surface), there is technologies that can achieve that:
It is a template matching problem, see https://docs.opencv.org/4.5.2/d4/dc6/tutorial_py_template_matching.html.

How to reconstruct an old image?

I have taken a picture of a very old image . That picture is itself a bit scarred and so the content of the image is not properly visible. Is there any image re construction or extrapolation software available which I can download and use it to re construct the image and make it very clear to the naked eye ?
I would suggest using photoshop but if you want to use other tools that are maybe easier (more friendly) than akvis.
I honestly would go the route of photoshop and go through photo restoring tutorials (tons online).
Good luck

How does facebook handle resizing of images

Hello I am building a social network similar to facebook and I really need some help on how to handle the images in my website. I would like to know how sites like facebook manage the resizing of their images. An example would be looking at someones photo album. The length and width are not just simply changed. They are done in a more professional way to make the image still look clear and not stretched. Do they use a special tool for this. Another example would be profile pics when they are loaded to your message wall. Your friends profile pics are centered and cropped accordingly and then re sized. How do they go about doing this. Any help would be greatly appreciated.
They resize proportionally with an imaging library like GD, Imagick or others.
The presentation in the gray area is just that, presentation so HTML and CSS.
They stretch the images proportionally so that they don't look wrong; if you make the image 37.5% wider... you also make it 37.5% taller.
If we knew what language you are familiar with, we could probably suggest something to help with this.

What is the difference between ImageMagick and libGD?

I don't know anything about either library but I have to choose one of them.
Which one whould you recommend?
I'm using Perl. I need to generate images for weather site. The image is generated for a location and should contain temperature and a weather condition image inside. I guess this is a piece of cake for both libs. But I want to know which one is more powerful. I've read that libGD is not able to rotate text. Maybe there are some other drawbacks? Which one generates images faster? Whose API is easier to use?
according to this source, you should use GD:
GD and other modules built on top of that (like GD::Graph) are more aimed at producing "new" images like charts.
And you can read "Develop your own weather maps and alerts with Perl and GD", which is what you're looking for.
If you some some time. try them both, play a little, and decide.
I find both to be straightforward to use ImageMagick gives you a lot more power than gd. Here are two Magick examples from my posts:
How can I use IO::Scalar with Image::Magick::Read()
How can I resize an image to fit area with Image::Magick?
to give you examples of the API.
I have used GD to create a visualization.
See Script : giss-timeline-graphs.pl on that page.
imagemagick is more robust, however libGD should be able to cover most of the image generation tasks as well. you should see perl API/functions to both of these libraries to see what is more convenient for you.

Make image transparent in ruby

I was wondering if anyone could suggest to me potential libraries in ruby for manipulating jpegs? Specifically I want to make the image 50% transparent so it can act as an overlay. The image in question would be of a house and I'd like it to overlay a village image.
Just being specific about the image as the transforms may not like multiple colours :)
Take a look at RMagick. This tutorial features transparency/opacity.
Best wishes,
Fabian
Check out RMagick

Resources