Open GoogleCodeExporter opened 8 years ago
Not sure if this would help or not, but just a thought - I wonder if ceil() is
part
of the problem. Perhaps it would be better to create a custom rounding function
that
rounds down if less than .5 and rounds up if .5 or greater. That way the
dimension
that is being calculated relative to the dimension that is being set.
For example, if someone sets w100 and the resulting height calculation is
234.01,
ceil() would round that up to 235, and hence stretching the image to almost an
entire
pixel. But if you had a custom rounding function, it would round down to 234 and
therefore it would shrink it by only .01 of a pixel.
Just an idea!
Original comment by adrianbj...@gmail.com
on 3 Mar 2010 at 3:46
I noticed that you just switched from ceil to round, but I am not sure if that
will
be any better. In my comment above I was suggesting that it should round up or
down
depending on which it is closer to. Because round always goes down, I don't see
this
will help. Please let me know if I am missing the point though :)
Original comment by adrianbj...@gmail.com
on 3 Mar 2010 at 8:15
Hi
I'm using SLIR on my site and having problem with the quality.
Here is the original image
http://chwisgi.com/wp-content/uploads/hanyu-1986-22-years-part-des-anges-14579.j
pg
Here is the same image at the same size and q=100
http://chwisgi.com/slir/?w=400&h=534&q=100&i=/wp-content/uploads/hanyu-1986-22-y
ears-part-des-anges-14579.jpg
Here is the image in a smaller size
http://chwisgi.com/slir/?w=150&h=250&q=100&i=/wp-content/uploads/hanyu-1986-22-y
ears-part-des-anges-14579.jpg
With both images there is visible artifacts in the white area, is there a way
to remove this?
/Jens
Original comment by jens.we...@antrop.se
on 15 Aug 2011 at 8:28
Original issue reported on code.google.com by
adrianbj...@gmail.com
on 26 Feb 2010 at 11:27