API java : RenderedImage


java.awt.image
Interface RenderedImage

All Known Subinterfaces:
WritableRenderedImage
All Known Implementing Classes:
BufferedImage

public interface RenderedImage

RenderedImage is a common interface for objects which contain or can produce image data in the form of Rasters. The image data may be stored/produced as a single tile or a regular array of tiles.


Method Summary
 WritableRaster copyData(WritableRaster raster)
          Computes an arbitrary rectangular region of the RenderedImage and copies it into a caller-supplied WritableRaster.
 ColorModel getColorModel()
          Returns the ColorModel associated with this image.
 Raster getData()
          Returns the image as one large tile (for tile based images this will require fetching the whole image and copying the image data over).
 Raster getData(Rectangle rect)
          Computes and returns an arbitrary region of the RenderedImage.
 int getHeight()
          Returns the height of the RenderedImage.
 int getMinTileX()
          Returns the minimum tile index in the X direction.
 int getMinTileY()
          Returns the minimum tile index in the Y direction.
 int getMinX()
          Returns the minimum X coordinate (inclusive) of the RenderedImage.
 int getMinY()
          Returns the minimum Y coordinate (inclusive) of the RenderedImage.
 int getNumXTiles()
          Returns the number of tiles in the X direction.
 int getNumYTiles()
          Returns the number of tiles in the Y direction.
 Object getProperty(String name)
          Gets a property from the property set of this image.
 String[] getPropertyNames()
          Returns an array of names recognized by getProperty(String) or null, if no property names are recognized.
 SampleModel getSampleModel()
          Returns the SampleModel associated with this image.
 Vector<RenderedImage> getSources()
          Returns a vector of RenderedImages that are the immediate sources of image data for this RenderedImage.
 Raster getTile(int tileX, int tileY)
          Returns tile (tileX, tileY).
 int getTileGridXOffset()
          Returns the X offset of the tile grid relative to the origin, i.e., the X coordinate of the upper-left pixel of tile (0, 0).
 int getTileGridYOffset()
          Returns the Y offset of the tile grid relative to the origin, i.e., the Y coordinate of the upper-left pixel of tile (0, 0).
 int getTileHeight()
          Returns the tile height in pixels.
 int getTileWidth()
          Returns the tile width in pixels.
 int getWidth()
          Returns the width of the RenderedImage.
 

Method Detail

getSources

Vector<RenderedImage> getSources()
Returns a vector of RenderedImages that are the immediate sources of image data for this RenderedImage. This method returns null if the RenderedImage object has no information about its immediate sources. It returns an empty Vector if the RenderedImage object has no immediate sources.

Returns:
a Vector of RenderedImage objects.

getProperty

Object getProperty(String name)
Gets a property from the property set of this image. The set of properties and whether it is immutable is determined by the implementing class. This method returns java.awt.Image.UndefinedProperty if the specified property is not defined for this RenderedImage.

Parameters:
name - the name of the property
Returns:
the property indicated by the specified name.
See Also:
Image.UndefinedProperty

getPropertyNames

String[] getPropertyNames()
Returns an array of names recognized by getProperty(String) or null, if no property names are recognized.

Returns:
a String array containing all of the property names that getProperty(String) recognizes; or null if no property names are recognized.

getColorModel

ColorModel getColorModel()
Returns the ColorModel associated with this image. All Rasters returned from this image will have this as their ColorModel. This can return null.

Returns:
the ColorModel of this image.

getSampleModel

SampleModel getSampleModel()
Returns the SampleModel associated with this image. All Rasters returned from this image will have this as their SampleModel.

Returns:
the SampleModel of this image.

getWidth

int getWidth()
Returns the width of the RenderedImage.

Returns:
the width of this RenderedImage.

getHeight

int getHeight()
Returns the height of the RenderedImage.

Returns:
the height of this RenderedImage.

getMinX

int getMinX()
Returns the minimum X coordinate (inclusive) of the RenderedImage.

Returns:
the X coordinate of this RenderedImage.

getMinY

int getMinY()
Returns the minimum Y coordinate (inclusive) of the RenderedImage.

Returns:
the Y coordinate of this RenderedImage.

getNumXTiles

int getNumXTiles()
Returns the number of tiles in the X direction.

Returns:
the number of tiles in the X direction.

getNumYTiles

int getNumYTiles()
Returns the number of tiles in the Y direction.

Returns:
the number of tiles in the Y direction.

getMinTileX

int getMinTileX()
Returns the minimum tile index in the X direction.

Returns:
the minimum tile index in the X direction.

getMinTileY

int getMinTileY()
Returns the minimum tile index in the Y direction.

Returns:
the minimum tile index in the X direction.

getTileWidth

int getTileWidth()
Returns the tile width in pixels. All tiles must have the same width.

Returns:
the tile width in pixels.

getTileHeight

int getTileHeight()
Returns the tile height in pixels. All tiles must have the same height.

Returns:
the tile height in pixels.

getTileGridXOffset

int getTileGridXOffset()
Returns the X offset of the tile grid relative to the origin, i.e., the X coordinate of the upper-left pixel of tile (0, 0). (Note that tile (0, 0) may not actually exist.)

Returns:
the X offset of the tile grid relative to the origin.

getTileGridYOffset

int getTileGridYOffset()
Returns the Y offset of the tile grid relative to the origin, i.e., the Y coordinate of the upper-left pixel of tile (0, 0). (Note that tile (0, 0) may not actually exist.)

Returns:
the Y offset of the tile grid relative to the origin.

getTile

Raster getTile(int tileX,
               int tileY)
Returns tile (tileX, tileY). Note that tileX and tileY are indices into the tile array, not pixel locations. The Raster that is returned is live and will be updated if the image is changed.

Parameters:
tileX - the X index of the requested tile in the tile array
tileY - the Y index of the requested tile in the tile array
Returns:
the tile given the specified indices.

getData

Raster getData()
Returns the image as one large tile (for tile based images this will require fetching the whole image and copying the image data over). The Raster returned is a copy of the image data and will not be updated if the image is changed.

Returns:
the image as one large tile.

getData

Raster getData(Rectangle rect)
Computes and returns an arbitrary region of the RenderedImage. The Raster returned is a copy of the image data and will not be updated if the image is changed.

Parameters:
rect - the region of the RenderedImage to be returned.
Returns:
the region of the RenderedImage indicated by the specified Rectangle.

copyData

WritableRaster copyData(WritableRaster raster)
Computes an arbitrary rectangular region of the RenderedImage and copies it into a caller-supplied WritableRaster. The region to be computed is determined from the bounds of the supplied WritableRaster. The supplied WritableRaster must have a SampleModel that is compatible with this image. If raster is null, an appropriate WritableRaster is created.

Parameters:
raster - a WritableRaster to hold the returned portion of the image, or null.
Returns:
a reference to the supplied or created WritableRaster.

Ces informations proviennent du site de http://java.sun.com

Remarques

Contenu

Le contenu de cette page provient du site de Sun, et est généré depuis un cache sur l'infobrol après certains traitements automatisés. La présentation peut donc différer du document original, mais le contenu aussi. Vous pouvez utiliser ce bouton pour afficher la page originale du site de Sun :

Quels sont les motivations de cette démarche?

Maintenir les pages en cache sur différents sites peut offrir plus de disponibilité.

Chaque page est indexée dans la base de donnée, ce qui permet de retrouver facilement les informations, au moyen des sommaires, du moteur de recherche interne, etc.

Des facilités sont mises en place pour que les membres de l'infobrol puissent effectuer des traductions en français des différents documents. Ceci devrait permettre aux débutants en programmation Java de consulter les API en français s'ils maîtrisent moins bien la langue de Shakespeare. Dans le cas où une traduction a été soumise, elle est disponible au moyen d'un lien en bas de page. Si la traduction a été validée, la page s'affiche par défaut en français, et un lien en bas de page permet d'atteindre la version en anglais.

Le code sur l'infobrol est automatiquement coloré selon la syntaxe, et les différents mots clés sont transformés en liens pour accéder rapidement aux informations.

Vous avez la possibilité de partager vos expériences en proposant vos propres extraits de code en utilisant le bouton "ajouter un commentaire" en bas de page. Si vous visitez simplement l'infobrol, vous avez déjà accès à cette fonction, mais si vous étes membre du brol, vous pouvez en plus utiliser des boutons supplémentaires de mise en forme, dont la coloration automatique de vos extraits de codes.

Réseaux sociaux

Vous pouvez modifier vos préférences dans votre profil pour ne plus afficher les interactions avec les réseaux sociaux sur ces pages.

 

Nuage de mots clés

7 mots clés dont 0 définis manuellement (plus d'information...).

Avertissement

Cette page ne possède pas encore de mots clés manuels, ceci est donc un exemple automatique (les niveaux de pertinence sont fictifs, mais les liens sont valables). Pour tester le nuage avec une page qui contient des mots définis manuellement, vous pouvez cliquer ici.

Vous pouvez modifier vos préférences dans votre profil pour ne plus afficher le nuage de mots clés.

 

Astuce pour imprimer les couleurs des cellules de tableaux : http://www.gaudry.be/ast-rf-450.html
Aucun commentaire pour cette page

© Ce document issu de l′infobrol est enregistré sous le certificat Cyber PrInterDeposit Digital Numbertection. Enregistrement IDDN n° 5329-1925
Document créé le 31/08/06 00:42, dernière modification le Vendredi 17 Juin 2011, 12:12
Source du document imprimé : http://www.gaudry.be/java-api-rf-java/awt/image/RenderedImage.html Document affiché 1 fois ce mois de Juin.
St.Gaudry©07.01.02
Outils (masquer)
||
Recherche (afficher)
Recherche :

Utilisateur (masquer)
Navigation (masquer)
Apparence (afficher)
Stats (afficher)
15832 documents
452 astuces.
549 niouzes.
3099 definitions.
447 membres.
8115 messages.

Document genere en :
0,49 seconde

Mises à jour :
Mises à jour du site
Citation (masquer)
Vous croyez encore que l'on n'embrasse qu'avec les lèvres ; mais les vrais baisers sont des sourires.

Denys Gagnon [Extrait de Haute et profonde la nuit]
 
l'infobrol
Nous sommes le Vendredi 01 Juin 2012, 14:56, toutes les heures sont au format GMT+1.00 Heure, heure d'été (+1)