Return-Path: Mailing-List: contact fop-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list fop-dev@xml.apache.org Received: (qmail 67695 invoked from network); 8 Sep 2000 18:25:10 -0000 Received: from jason.eastpoint.com (HELO epoint03.eastpoint.com) (216.204.10.12) by locus.apache.org with SMTP; 8 Sep 2000 18:25:10 -0000 Received: by epoint03.eastpoint.com with Internet Mail Service (5.5.2650.21) id ; Fri, 8 Sep 2000 14:17:42 -0400 Message-ID: <0093DE2D10D1D31197FF00A0C9A4D41E384E11@epoint03.eastpoint.com> From: Art Welch To: "'fop-dev@xml.apache.org'" Subject: RE: JDK 1.1 and Images EUREKA!!! (commit please) Date: Fri, 8 Sep 2000 14:17:40 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N To support grayscale images I would need to add palette support. A grayscale BMP is just an eight bit per pixel image where the palette values all happen to be shades of gray. Normally (but not necessarily) the palette would just be the values from 0 - 255 (so I could cheat). I will see what can be done. If I add palette support, it should be easy enough later on to change BmpImage to return the palette data to IndexedColorSpace instead of converting it to RGB. I am a bit busy at the moment, so it may not happen right away. -----Original Message----- From: Eric SCHAEFFER [mailto:eschaeffer@posterconseil.com] Sent: Friday, September 08, 2000 1:53 PM To: fop-dev@xml.apache.org Subject: Re: JDK 1.1 and Images EUREKA!!! (commit please) ----- Original Message ----- From: "Art Welch" To: Sent: Friday, September 08, 2000 6:27 PM Subject: RE: JDK 1.1 and Images EUREKA!!! (commit please) > This is a relief. Monochrome (one bit per pixel/black and white) images > worked in my testing, so if they did not work for you it would have been one > of those icky hard to reproduce problems. > > The grayscale image was probably eight bits per pixel. For these images to > display properly you need to read the palette information from the BMP file > and map the pixel color to the palette value. I have not done this yet. It > is not that difficult to do, but not a priority at the moment. Since FOP > uses 24 bpp internally anyway if someone had a 2, 4, or 8 BPP BMP that they > wanted to display they could just convert it to 24 BPP. But if someone did > have a need for this, they could let me (or the list) know and I (or > someone) could probably add this. BmpImage is open to this addition. > I'd like to add support for color indexed images, but keeping the palette (not converting the image into full RGB). But for this, I need to implement an IndexedColorSpace class... (don't have the time, maybe next week...) > The green is because for 8 BPP images I just loaded the pixel value into the > green channel. > > Do you think that it would be better to throw an exception, print a message, > or something if we get a BMP format that is not really properly supported? I > was just leaving it open for the addition of more complete support. > If it isn't supported, throw an exception. But for greycaled bmp images, it works a bit... Can you change your class to load grayscaled images in the proper way ? Eric. ...