• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to use abstract class pngencoder  RSS feed

 
Soumik Basu
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I am developing an application in JSP.I am using scriplet.
My objective is to convert a .tiff file to a .png file.
I have used the File_See_able class and Imagedecoder for taking the tiff image byte by byte and then finally i have to encode the image in .png format but i found that in com.sun.media.jai.codec.PNGEncodeParam the PNGencodeparam is abstract class.
I was creating the instance like this:
PNGEncodeParam pngparam=new PNGEncodeParam();

For the time being I have used JPEGencodparam but the client's request is for png.
please help me out.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it can be much simpler than what you're trying to do. If you use the javax.imageio.ImageIO class (particularly its read and write methods) in conjunction with an ImageIO plugin that understands TIFF images, the whole thing might be less than 10 lines of code.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!