--Boundary-00=_lK2b9EXcLfiBiJX Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello, the attached patch adds support for the interlace mode to the PNG file plug= in.=20 The current PNG spec only knows two diffrent modes: Adam7 (byte 28 is set t= o=20 1) or none (byte 28 is set to 0). regards Volker Krause --Boundary-00=_lK2b9EXcLfiBiJX Content-Type: text/x-diff; charset="us-ascii"; name="kfile_png_interlace.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kfile_png_interlace.diff" Index: kfile_png.cpp =================================================================== RCS file: /home/kde/kdegraphics/kfile-plugins/png/kfile_png.cpp,v retrieving revision 1.15 diff -u -r1.15 kfile_png.cpp --- kfile_png.cpp 29 Aug 2002 17:46:06 -0000 1.15 +++ kfile_png.cpp 30 Aug 2002 11:43:45 -0000 @@ -71,6 +71,12 @@ { I18N_NOOP("Deflate") }; + + // interlaced modes +static const char* interlaceModes[] = { + I18N_NOOP("None"), + I18N_NOOP("Adam7") +}; typedef KGenericFactory PngFactory; @@ -103,6 +109,7 @@ addItemInfo(group, "ColorMode", i18n("Color mode"), QVariant::String); addItemInfo(group, "Compression", i18n("Compression"), QVariant::String); + addItemInfo(group, "InterlaceMode", i18n("Interlace mode"),QVariant::String); } bool KPngPlugin::readInfo( KFileMetaInfo& info, uint what) @@ -157,6 +164,8 @@ (type < sizeof(colors)/sizeof(colors[0])) ? i18n(colors[data[25]]) : i18n("Unknown")); appendItem(techgroup, "Compression", (data[26] < sizeof(compressions)/sizeof(compressions[0])) ? i18n(compressions[data[26]]) : i18n("Unknown")); + appendItem(techgroup, "InterlaceMode", + (data[28] < sizeof(interlaceModes)/sizeof(interlaceModes[0])) ? i18n(interlaceModes[data[28]]) : i18n("Unknown")); } // look for a tEXt chunk Index: kfile_png.desktop =================================================================== RCS file: /home/kde/kdegraphics/kfile-plugins/png/kfile_png.desktop,v retrieving revision 1.38 diff -u -r1.38 kfile_png.desktop --- kfile_png.desktop 31 Jul 2002 10:46:55 -0000 1.38 +++ kfile_png.desktop 30 Aug 2002 11:43:45 -0000 @@ -40,4 +40,4 @@ X-KDE-Library=kfile_png MimeType=image/png PreferredGroups=Comment,Technical -PreferredItems=Title,Author,Dimensions,BitDepth,ColorMode,Compression +PreferredItems=Title,Author,Dimensions,BitDepth,ColorMode,Compression,InterlaceMode --Boundary-00=_lK2b9EXcLfiBiJX-- >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<