NailThumb
NailThumb copied to clipboard
Issue with image distortion for lower resolution.
Hi,
Thank you for creating such a plugin.
I have 2 images with different resolutions as 200x200 & 400x400. Applied below code block
$('.square').nailthumb({
replaceAnimation:null
});
with below style:
.square {
width: 400px,
height: 400px
}
Image with 400x400 looked fine as it should be. But 200x200 image got distortion. Now, the some reason i am not allowed to change the resolution of 200x200 to 400x400.
Is there any way to fix this ? Thanks
Hi, sorry but I've seen this only now. I think there s absolutely no way to avoid "distortion" if you set an image via css to a higher resolution then the image itself. For this reason the option maxEnlargement is available. If you set this to maxEnlargement: 1 you'll have an image with no distortion of only 200x200 centered on your placeholder. PS: this is not actually distortion, but pixalation. There are tecniques to limit it when working with image editing but I'm not aware of any tecnique working just in presentation phase (css).