applied patch from Chuck Mason <chuckjr@unbounded.com> that fixes wrong

2001-02-27  Sven Neumann  <sven@gimp.org>

	* plug-ins/common/header.c: applied patch from Chuck Mason
	<chuckjr@unbounded.com> that fixes wrong output of header plug-in.
This commit is contained in:
Sven Neumann 2001-02-27 16:01:08 +00:00 committed by Sven Neumann
parent 8e3259d084
commit f19f4389a6
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2001-02-27 Sven Neumann <sven@gimp.org>
* plug-ins/common/header.c: applied patch from Chuck Mason
<chuckjr@unbounded.com> that fixes wrong output of header plug-in.
2001-02-27 Michael Natterer <mitch@gimp.org>
* app/apptypes.h

View File

@ -181,7 +181,7 @@ save_image (gchar *filename,
switch (drawable_type)
{
case GIMP_RGB_IMAGE:
fprintf (fp, "#define HEADER_PIXEL(data,pixel) {\\\n pixel[0] = (((data[0] - 33) << 2) | ((data[1] - 33) >> 4)); \\\n pixel[1] = ((((data[1] - 33) & 0xF) << 4) | ((data[2] - 33) >> 2)); \\\n pixel[2] = ((((data[2] - 33) & 0x3) << 6) | ((data[3] - 33))); \\\n data += 4;\n}\n");
fprintf (fp, "#define HEADER_PIXEL(data,pixel) {\\\n pixel[0] = (((data[0] - 33) << 2) | ((data[1] - 33) >> 4)); \\\n pixel[1] = ((((data[1] - 33) & 0xF) << 4) | ((data[2] - 33) >> 2)); \\\n pixel[2] = ((((data[2] - 33) & 0x3) << 6) | ((data[3] - 33))); \\\n data += 4; \\\n}\n");
fprintf (fp, "static char *header_data =\n\t\"");
data = g_new (guchar, drawable->width * drawable->bpp);