001    /*
002     * PalettedImage
003     *
004     * Copyright (c) 2001, 2002, 2003 Marco Schmidt.
005     * All rights reserved.
006     */
007    
008    package net.sourceforge.jiu.data;
009    
010    import net.sourceforge.jiu.data.Palette;
011    
012    /**
013     * This interface defines methods for paletted images.
014     * The image data of paletted images are usually integer numbers.
015     * Those numbers are index values into a list of colors called
016     * the <em>palette</em> or <em>color map</em>.
017     * This way, for images with few colors relatively small integers
018     * can be used as samples. 
019     */
020    public interface PalettedImage
021    {
022            /** 
023             * Gets the palette of this image.
024             * @return palette object
025             */
026            Palette getPalette();
027    
028            /** 
029             * Sets the palette of this image to the argument palette object.
030             * @param palette the new palette for this image
031             */
032            void setPalette(Palette palette);
033    }