delphi - How can I convert PNG to GIF keeping the transparency? -
how can convert png gif keeping transparency?
i have hoped using assign( ) method work doesn't seem migrate transparency. in gif, it's represented black.
png:=tpngimage.create; try png.loadfromfile(sfile); // comes file: png.transparencymode; // comes file: png.transparent // didn't help: gif.transparent:=true; gif.assign(png); // didn't help: gif.transparent:=true; gif.savetofile('e:\tmp\out.gif'); png.free; end;
i haven't found way handle in delphi...
thanks!
it possible transfer image png gif. however, don't recommend so. gif format substantially less capable png. png supports rgba color channels , partial transparency. gif uses 256 color palette , no support partial transparency.
there many libraries available make best of bad job , attempt produce gif image close png image, information lost.
the gif format dates late 1980s , time has moved on. has long since served purpose. png modern, capable , supported. if possible should switch gif using png.
Comments
Post a Comment