Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to reduce color palette of an image  RSS feed

 
Dinesh Mungra
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My current customer offers an internet banking solution in which some sensitive data is converted to an image (can be png, gif, jpg) to counteract phishing. The conversion is not fast enough for the coming peak period. The current configuration generates a true color image. Is it possible to create a 256-color color palette with just the right colors, and use that while rendering? 256-color images render much faster. I am trying to extract the IndexedColorMap from a sample true color image and use that for a 256-color image (BufferedImage). Am I on the right track? The client expects results within a week. I am a Java senior with 8 yrs of experience but I am not an expert on imaging...
Thanks in advance.
 
Dinesh Mungra
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm sorry, I meant ColorModel instead of ColorMap.
I'm trying to get an IndexedColorModel with only the right colors. Is this the right way to go?
 
Dinesh Mungra
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oops again. IndexColorModel (instead of Indexed...)
 
colton peterson
Ranch Hand
Posts: 97
Linux Python VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm a bit of a java newbie so if what I am suggesting is way off what you want then just ignore me. If it is possible to use the drawString() method in java.awt.Graphics it could make it faster. Like if you parsed the text file then drew all the text to a Image and save that as gif would that be faster?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!