I'm making audio-player for ct.fm. And again I have a bug in a place where it's not expected! Let's see the picture:
![]()
There is an icon 20x20 pixels. The 1px thick border is puted over. It's also 20x20 pixels. So why piece of the icon appear beyond the bounds of the border? Pada-pada-pam-pum-peeu! I was going to start swearing at damned Hindu-developers, when suddenly realized that it was I who was the fool.
(x=8, y=8.5, w=20, h=20)
So what is wrong with this trace? 8.5 is a key number. The clip containing icon and border is placed in fractional coordinates. As far as fractional coordinates don't exist for pixels - anti-aliasing is applied to the clip which results to the bug which makes me swear.
P.S. Photoshop nearly has made me swear also. How to enlarge selected area with "transform tool" without anti-aliasing (couse I need perfect enlarged pixels)? Very simple! Go to Edit=>Preferences=>General and set "Image interpolation" to "Nearest neighbor".
Comments
Post new comment