|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.co.silentsoftware.core.converters.spectrum.ScrConverter
public class ScrConverter
Converter to save images to the Spectrum scr memory model/dump format.
| Field Summary | |
|---|---|
private static int |
SCR_BITS_SIZE
SCR images are fixed size (representing Spectrum memory) - this is the size in bits |
static int |
SCR_SIZE
SCR images are fixed size (representing Spectrum memory) - this is the size in bytes |
| Constructor Summary | |
|---|---|
ScrConverter()
|
|
| Method Summary | |
|---|---|
int |
colourToBitSet(int colour,
java.util.BitSet bs,
int counter)
Shockingly bad method to convert Spectrum colour indexes to the relevant little endian bits. |
byte[] |
convert(java.awt.image.BufferedImage original,
ImageProcessor imagePro,
boolean isAlreadyProcessed)
Converts and returns an image converted using the given image processor if the image has not already been processed |
private byte[] |
convert(java.awt.image.BufferedImage original,
ImageProcessor imagePro,
boolean isAlreadyProcessed,
int screen)
|
private ColourData[][] |
getBlockedColourData(java.awt.image.BufferedImage img)
Retrieves the Spectrum two ink/paper colour data for blocks in the provided image. |
private int |
toScr(java.awt.image.BufferedImage output,
java.util.BitSet bs,
int counter,
ColourData[][] colourData)
Copies the buffered image output to the given bitset, but only copies the "ink" values, i.e. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int SCR_SIZE
private static final int SCR_BITS_SIZE
| Constructor Detail |
|---|
public ScrConverter()
| Method Detail |
|---|
private ColourData[][] getBlockedColourData(java.awt.image.BufferedImage img)
img -
public byte[] convert(java.awt.image.BufferedImage original,
ImageProcessor imagePro,
boolean isAlreadyProcessed)
original - imagePro - isAlreadyProcessed -
private byte[] convert(java.awt.image.BufferedImage original,
ImageProcessor imagePro,
boolean isAlreadyProcessed,
int screen)
private int toScr(java.awt.image.BufferedImage output,
java.util.BitSet bs,
int counter,
ColourData[][] colourData)
output - bs - counter - colourData -
public int colourToBitSet(int colour,
java.util.BitSet bs,
int counter)
colour - bs - counter -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||