converting jpeg to transparent png
Posted: 2012-05-09T05:02:57-07:00
hello guys..
here is the issue, i need to convert jpeg images(having white backgrounds) to transparent png images. this is the code being used at the moment:-
now the images do get converted, but it isnt perfect. most of the images end up with semi-transparent pixels in them. you tend to overlook it at first glance, but you get the issue when you impose the generated png on a dark background in photoshop. is there any way to make the conversion flawless?
this is a sample jpeg being used:-
and this is the output:-
thanks..
here is the issue, i need to convert jpeg images(having white backgrounds) to transparent png images. this is the code being used at the moment:-
Code: Select all
system("convert img.jpg -fuzz 10% -transparent white img.png");
this is a sample jpeg being used:-
and this is the output:-
thanks..