|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jpedal.io.ColorSpaceConvertor
public class ColorSpaceConvertor
set of static methods to save/load objects to convert images between different colorspaces - Several methods are very similar and I should recode my code to use a common method for the RGB conversion LogWriter is JPedal logging class
| Field Summary | |
|---|---|
static boolean |
isUsingARGB
Flag to trigger raster printing |
static boolean |
wasRemoved
|
| Constructor Summary | |
|---|---|
ColorSpaceConvertor()
|
|
| Method Summary | |
|---|---|
static java.awt.image.BufferedImage |
algorithmicConvertCMYKImageToRGB(byte[] buffer,
int w,
int h)
save raw CMYK data by converting to RGB using algorithm method - pdfsages supplied the C source and I have converted - This works very well on most colours but not dark shades which are all rolled into black This is what xpdf seems to use - Note we store the output data in our input queue to reduce memory usage - we have seen raw 2000 * 2000 images and having input and output buffers is a LOT of memory - I have kept the doubles in as I just rewrote Leonard's code - I haven't really looked at optimisation beyond memory issues |
static java.awt.image.BufferedImage |
algorithmicConvertCMYKImageToRGB(java.awt.image.DataBuffer data,
int w,
int h,
boolean debug)
save raw CMYK data by converting to RGB using algorithm method - pdfsages supplied the C source and I have converted - This works very well on most colours but not dark shades which are all rolled into black |
static java.awt.image.BufferedImage |
convertColorspace(java.awt.image.BufferedImage image,
int newType)
convert a BufferedImage to RGB colourspace |
static java.awt.image.BufferedImage |
convertFromICCCMYK(int width,
int height,
byte[] data,
java.awt.color.ColorSpace cs)
slightly contrived but very effective way to convert to RGB |
static java.awt.image.BufferedImage |
convertFromICCCMYK(int width,
int height,
java.awt.image.DataBuffer db,
java.awt.color.ColorSpace cs)
slightly contrived but very effective way to convert to RGB |
static java.awt.image.BufferedImage |
convertIndexedToFlat(int d,
int w,
int h,
byte[] data,
byte[] index,
int size,
boolean isARGB,
boolean isDownsampled)
|
static byte[] |
convertIndexToRGB(byte[] data,
java.awt.color.ColorSpace cs)
slightly contrived but very effective way to convert CMYK CMAP to RGB - I've treated the CMAP as an image and converted the values Default is CMYK, but I am trying to allow for other ColorSpaces |
static java.awt.image.BufferedImage |
convertToARGB(java.awt.image.BufferedImage image)
convert a BufferedImage to RGB colourspace (used when I clip the image) |
static java.awt.image.BufferedImage |
convertToRGB(java.awt.image.BufferedImage image)
convert any BufferedImage to RGB colourspace |
static java.awt.image.BufferedImage |
iccConvertCMYKImageToRGB(byte[] buffer,
int w,
int h,
java.lang.String profile)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static boolean wasRemoved
public static boolean isUsingARGB
| Constructor Detail |
|---|
public ColorSpaceConvertor()
| Method Detail |
|---|
public static java.awt.image.BufferedImage convertFromICCCMYK(int width,
int height,
byte[] data,
java.awt.color.ColorSpace cs)
public static java.awt.image.BufferedImage convertFromICCCMYK(int width,
int height,
java.awt.image.DataBuffer db,
java.awt.color.ColorSpace cs)
public static byte[] convertIndexToRGB(byte[] data,
java.awt.color.ColorSpace cs)
public static final java.awt.image.BufferedImage convertToRGB(java.awt.image.BufferedImage image)
public static final java.awt.image.BufferedImage convertToARGB(java.awt.image.BufferedImage image)
public static java.awt.image.BufferedImage algorithmicConvertCMYKImageToRGB(byte[] buffer,
int w,
int h)
public static java.awt.image.BufferedImage algorithmicConvertCMYKImageToRGB(java.awt.image.DataBuffer data,
int w,
int h,
boolean debug)
public static java.awt.image.BufferedImage convertIndexedToFlat(int d,
int w,
int h,
byte[] data,
byte[] index,
int size,
boolean isARGB,
boolean isDownsampled)
public static java.awt.image.BufferedImage iccConvertCMYKImageToRGB(byte[] buffer,
int w,
int h,
java.lang.String profile)
throws java.io.IOException
java.io.IOException
public static final java.awt.image.BufferedImage convertColorspace(java.awt.image.BufferedImage image,
int newType)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||