Re: BufferedImage
- From: "Boudewijn Dijkstra" <usenet@xxxxxxxxxxxxxxxxxxx>
- Date: Thu, 19 May 2005 12:21:14 +0200
"oopson" <oopson@xxxxxxxxx> schreef in bericht
news:7294a822571df2cc3c779b3a18fae7c8@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> hi
>
> i am creating images in java using
> BufferedImage(w,h,BufferedImage.TYPE_INT_RGB )
>
> then i set the pixels values using
>
> BufferedImage.setRGB(x,y,pixelvalue)
>
> according to hava documentation
>
> TYPE_INT_RGB Represents an image with 8-bit RGB color components packed
> into integer pixels. The image has a DirectColorModel without alpha.
>
> but always the size of the result image is (4 * number of pixels) so every
> pixel uses 4 bytes instead of 3 while i am setting just the 3 bytes RGB
That is because every pixel is packed into an int, which is 4 bytes. Only 3
of the 4 bytes are used.
> anyone can help?
What is the problem?
.
- References:
- BufferedImage
- From: oopson
- BufferedImage
- Prev by Date: Re: J2SE and Servlets!
- Next by Date: Re: Classe avec retour d'un objet BasicStroke
- Previous by thread: BufferedImage
- Next by thread: BufferedImage
- Index(es):
Relevant Pages
|