draw.sources.formats
Class Bmp

java.lang.Object
  extended by draw.sources.formats.Image
      extended by draw.sources.formats.Bmp

public class Bmp
extends Image

Image BMP.
Le fichier se décomposent en 17 parties.
3 couches suffisent à définir ces parties.
Types utilisées :

  • CHAR (8 bits)
  • INT (32 bits)
  • MOT (16 bits)
  • COLOR (24 bits)


  • Couche BITMAPFILEHEADER
    bfType : Nom du format (CHAR[])
    bfSize : Taille du fichier (INT)
    bfReserved1 : Réservé par Microsoft (MOT)
    bfReserved2 : Réservé par Microsoft (MOT)
    bfOffBits : Adresse (INT)
    Couche BITMAPINFOHEADER
    biSize : Taille de la couche (INT)
    biWidth : Largeur de l'image (INT)
    biHeight : Hauteur de l'image (INT)
    biPlanes : Nombre de plans (MOT)
    biBitCount : Nombre de bits par pixel (MOT)
    biCompression : Compression (INT)
    biSizeImage : Taille du fichier si compression (INT)
    biXpelsPerMeter : Résolution horizontale (INT)
    biYpelsPerMeter : Résolution verticale (INT)
    biClrUsed : Nombre de couleurs dans l'image (INT)
    biClrImportant : Nombre de couleurs importantes (INT)
    Couche BITMAPIMAGE
    biPixels : Pixels de l'image en RGB (COLOR[][])

    Version:
    1.0.0
    Author:
    COLIN Mathieu

    Field Summary
    static int bfOffBits
              Adresse.
    static int bfReserved1
              Réservé par Microsoft.
    static int bfReserved2
              Réservé par Microsoft.
    private  int bfSize
              Taille du fichier.
    static java.lang.String bfType
              Nom du format.
    static int biBitCount
              Nombre de bits par pixel.
    static int biClrImportant
              Nombre de couleurs importantes.
    static int biClrUsed
              Nombre de couleurs dans l'image.
    static int biCompression
              Compression.
    private  int biHeight
              Hauteur de l'image.
    private  java.awt.Color[][] biPixels
              Pixels de l'image en RGB.
    static int biPlanes
              Nombre de plans.
    static int biSize
              Taille de la couche.
    private  int biSizeImage
              Taille du fichier si compression.
    private  int biWidth
              Largeur de l'image.
    static int biXpelsPerMeter
              Résolution horizontale.
    static int biYpelsPerMeter
              Résolution verticale.
     
    Constructor Summary
    Bmp()
              Crée une image BMP.
    Bmp(Cadre cadre)
              Crée une image BMP.
     
    Method Summary
     Draw convert()
              Convertit l'image en une image DRAW.
     int getHeight()
              Retourne biHeight.
     java.lang.String getName()
              Retourne bfType.
     int getWidth()
              Retourne biWidth.
     void read(java.lang.String fichier)
              Lit un fichier BMP.
     void write(java.lang.String fichier)
              Ecrit un fichier BMP.
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Field Detail

    bfType

    public static final java.lang.String bfType
    Nom du format.

    See Also:
    Constant Field Values

    bfSize

    private int bfSize
    Taille du fichier.


    bfReserved1

    public static final int bfReserved1
    Réservé par Microsoft.

    See Also:
    Constant Field Values

    bfReserved2

    public static final int bfReserved2
    Réservé par Microsoft.

    See Also:
    Constant Field Values

    bfOffBits

    public static final int bfOffBits
    Adresse.

    See Also:
    Constant Field Values

    biSize

    public static final int biSize
    Taille de la couche.

    See Also:
    Constant Field Values

    biWidth

    private int biWidth
    Largeur de l'image.


    biHeight

    private int biHeight
    Hauteur de l'image.


    biPlanes

    public static final int biPlanes
    Nombre de plans.

    See Also:
    Constant Field Values

    biBitCount

    public static final int biBitCount
    Nombre de bits par pixel.

    See Also:
    Constant Field Values

    biCompression

    public static final int biCompression
    Compression.

    See Also:
    Constant Field Values

    biSizeImage

    private int biSizeImage
    Taille du fichier si compression.


    biXpelsPerMeter

    public static final int biXpelsPerMeter
    Résolution horizontale.

    See Also:
    Constant Field Values

    biYpelsPerMeter

    public static final int biYpelsPerMeter
    Résolution verticale.

    See Also:
    Constant Field Values

    biClrUsed

    public static final int biClrUsed
    Nombre de couleurs dans l'image.

    See Also:
    Constant Field Values

    biClrImportant

    public static final int biClrImportant
    Nombre de couleurs importantes.

    See Also:
    Constant Field Values

    biPixels

    private java.awt.Color[][] biPixels
    Pixels de l'image en RGB.

    Constructor Detail

    Bmp

    public Bmp(Cadre cadre)
    Crée une image BMP.

    Parameters:
    cadre - Cadre.

    Bmp

    public Bmp()
    Crée une image BMP.

    Method Detail

    getName

    public java.lang.String getName()
    Retourne bfType.

    Specified by:
    getName in class Image
    Returns:
    bfType.

    getWidth

    public int getWidth()
    Retourne biWidth.

    Specified by:
    getWidth in class Image
    Returns:
    biWidth.

    getHeight

    public int getHeight()
    Retourne biHeight.

    Specified by:
    getHeight in class Image
    Returns:
    biHeight.

    read

    public void read(java.lang.String fichier)
    Lit un fichier BMP.

    Specified by:
    read in class Image
    Parameters:
    fichier - Nom du fichier.

    write

    public void write(java.lang.String fichier)
    Ecrit un fichier BMP.

    Specified by:
    write in class Image
    Parameters:
    fichier - Nom du fichier.

    convert

    public Draw convert()
    Convertit l'image en une image DRAW.

    Specified by:
    convert in class Image
    Returns:
    Image DRAW.