You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by bu...@apache.org on 2008/05/05 16:37:27 UTC
DO NOT REPLY [Bug 44933] New: Color palette of .bmp files with 1
bit/
pixel not used
https://issues.apache.org/bugzilla/show_bug.cgi?id=44933
Summary: Color palette of .bmp files with 1 bit/pixel not used
Product: Fop
Version: 0.94
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P3
Component: images
AssignedTo: fop-dev@xmlgraphics.apache.org
ReportedBy: d.trombetta@mbm.it
Depends on: 6178
I found this bug reported for all versions.
It has been marked as fixed, but I still got the same behaveiour.
+++ This bug was initially created as a clone of Bug #6178 +++
The color palette of .bmp files with 1 bit/pixel is not used when loading
image.
Example of a bmp header I've received from Alchemy on Unix:
0000 424DAE8E01000000 00003E0000002800
0010 000016030000FC03 0000010001000000
0020 0000708E0100C21E 0000C21E00000000
0030 000000000000FFFF FF00000000000000
0040 0000000000000000 0000000000000000
The palette is inverted (why, I don't know). So a 0 bit means a white pixel and
a 1 bit means a black pixel.
In class org.apache.fop.image.BmpImage, method loadImage ignores the palette in
that case (it's not even constructed). For FOP, a 0 bit means always black
pixel and a 1 bit means always white pixel.
So my image appears in Acrobat Reader as inverted video.
I have fixed the bug with the following statements :
if (headermap[28] == 4 || headermap[28] == 8 || headermap[28] == 1) {
to always build the palette and
for (int countr = 0; countr < 8 && x < this.m_width;
countr++) {
if ((p & 0x80) != 0) {
this.m_bitmaps[3 * (i * this.m_width + x)] =
// (byte)0xFF;
palette[3];
this.m_bitmaps[3 * (i * this.m_width + x) + 1] =
// (byte)0xFF;
palette[4];
this.m_bitmaps[3 * (i * this.m_width + x) + 2] =
// (byte)0xFF;
palette[5];
} else {
this.m_bitmaps[3 * (i * this.m_width + x)] =
// (byte)0;
palette[0];
this.m_bitmaps[3 * (i * this.m_width + x) + 1] =
// (byte)0;
palette[1];
this.m_bitmaps[3 * (i * this.m_width + x) + 2] =
// (byte)0;
palette[2];
}
to use it.
I think it could help.
Frédéric.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 44933] Color palette of .bmp files with 1
bit/pixel not used
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=44933
Glenn Adams <gl...@skynav.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |CLOSED
--- Comment #3 from Glenn Adams <gl...@skynav.com> 2012-04-01 13:55:56 UTC ---
batch transition to closed remaining pre-FOP1.0 resolved bugs
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 44933] Color palette of .bmp files with 1 bit/
pixel not used
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=44933
Jeremias Maerki <je...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #1 from Jeremias Maerki <je...@apache.org> 2008-05-07 00:13:31 PST ---
Would you please retest with FOP 0.95beta? This version has a completely new
image loading framework. The problem may not appear anymore. If it still does,
please attach a (legally unproblematic) sample image to this issue so we have a
test case. Thanks.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 44933] Color palette of .bmp files with 1 bit/
pixel not used
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=44933
Jeremias Maerki <je...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |RESOLVED
Resolution| |WORKSFORME
--- Comment #2 from Jeremias Maerki <je...@apache.org> 2008-06-02 02:49:13 PST ---
I've manually created a 1-bit image with a non-regular palette. It was properly
picked up by FOP 0.95beta. BMP support needs JAI Image I/O Tools to be present
in the classpath: http://xmlgraphics.apache.org/fop/0.95/graphics.html#bmp
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.