Peter
----- Original Message ----- From: "Dan Maltes" <[EMAIL PROTECTED]>
To: "DAN MALTES" <[EMAIL PROTECTED]>; "'Jonathan Gilbert'" <[EMAIL PROTECTED]>; <[email protected]>
Sent: 16 March, 2005 14:19
Subject: RE: [Mono-winforms-list] libgdiplus/System.Drawing patch: native support for indexed Bitmaps
LibTIFF for instance: http://libtiff.maptools.org/
-Dan
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dan Maltes Sent: Wednesday, March 16, 2005 4:15 PM To: 'Jonathan Gilbert'; [email protected] Subject: RE: [Mono-winforms-list] libgdiplus/System.Drawing patch: native support for indexed Bitmaps
Any chance there is existing TIFF loading code available that could be used
with permission in Mono? Could save time.
Dan Maltes
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jonathan Gilbert Sent: Wednesday, March 16, 2005 3:35 PM To: [email protected] Subject: Re: [Mono-winforms-list] libgdiplus/System.Drawing patch: native support for indexed Bitmaps
At 02:08 PM 16/03/2005 -0300, Fabian Luque wrote:Probably the cleanest way to remove the warning, without making the code do an extra assignment when it doesn't have to, is to add a 'default' block that sets it to 'NULL':
default: default_palette = NULL;
After making this change, libgdiplus compiled just fine.
Now, when I open my 1bpp TIFF file and the save it to PNG I'm still getting a 32bpp 180 KB file instead of a 1bpp file around 80 KB.
The problem here is that because the TIFF format is massive and complex, I
decided to postpone indexed TIFF loading support for a later patch. This
patch does not alter the way the TIFF codec loads TIFF files, and as such
they are upsampled to 32bpp at load time. Then, when you go to save the
Bitmap, the PNG codec says "hmm, this is a 32-bpp RGB Bitmap object, so I'll
make a 24-bit RGB PNG file".
Is it possible for you to pre-convert the TIFFs to another format, like BMP
or PNG, or is this the whole point of what you were trying to accomplish
using System.Drawing? :-)
Jonathan Gilbert
_______________________________________________ Mono-winforms-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-winforms-list
_______________________________________________ Mono-winforms-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-winforms-list
_______________________________________________ Mono-winforms-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-winforms-list
_______________________________________________ Mono-winforms-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-winforms-list
