Java: make GIF or PNG image background transparent
$30-100 USD
Completed
Posted over 16 years ago
$30-100 USD
Paid on delivery
I have a few hundred gif images that are objects on a white background - like the one attached.
I need a small Java function that converts this GIF to one that has the surrounding white area transparent. The output image may be a PNG as well - if that helps you.
The important thing is, that if there's a white spot in the middle of the object that must remain white, not transparent.
Also the edges must remain smooth.
I suppose this is 10-20 lines of Java code, if you know your job, or research this.
Thanks
Rudi
PS: so far I've used a Corel VB script like this, it's just I can't run this on my Java webserver:
WITHOBJECT "CorelPhotoPaint.Automation.10"
.FileOpen Src$+File$+".gif", 0, 0, 0, 0, 0, 1, 1
.ImageConvert 1, 1, 0, 0, 0, 0, 0, 0, 0, FALSE
.MaskMagicWand 0, 0, 0, FALSE, TRUE, 0, 8, 0, 0, 0
.ImageConvert 4, 3, 0, 0, 0, 0, 0, 256, 100, FALSE
.FileSave Src$+"transparent\"+File$+".gif", 773, 0
END WITHOBJECT
## Deliverables
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):
a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment.
b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.
3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).
## Platform
Java, all platforms