summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2002-09-17 20:27:19 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2002-09-17 20:27:19 +0000
commit0792860a57d4185a22ea9e0e0646a9b14c27b444 (patch)
treeea35fa6b846d885522237c00ab0a112d18d2fcb4
parent11bf9b28da63ee26632b6cf72aeba16115daf9b3 (diff)
Add support for XV/GIMP thumbnail format (P7)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2626 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--CHANGES7
-rw-r--r--configure.in6
-rw-r--r--fltk.spec6
-rw-r--r--src/Fl_PNM_Image.cxx16
-rw-r--r--src/fl_images_core.cxx6
5 files changed, 26 insertions, 15 deletions
diff --git a/CHANGES b/CHANGES
index 49d62b50e..74a945c6a 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,10 +1,9 @@
CHANGES IN FLTK 1.1.0rc7
+ - Fl_PNM_Image now supports the XV/GIMP thumbnail format
+ (P7).
- Fl_Preferences would not find groups inside the root
- group.
-
-CHANGES IN FLTK 1.1.0
-
+ group.
- Small bug fixes for Fl_Chart, Fl_Scrollbar, Fl_Tabs,
and FLUID from Matthew Morrise.
- Fl_Chart didn't have its own destructor, so data in
diff --git a/configure.in b/configure.in
index 43913a19e..82f07cd58 100644
--- a/configure.in
+++ b/configure.in
@@ -1,7 +1,7 @@
dnl -*- sh -*-
dnl the "configure" script is made from this by running GNU "autoconf"
dnl
-dnl "$Id: configure.in,v 1.33.2.31.2.85 2002/08/12 19:42:54 easysw Exp $"
+dnl "$Id: configure.in,v 1.33.2.31.2.86 2002/09/17 20:27:17 easysw Exp $"
dnl
dnl Configuration script for the Fast Light Tool Kit (FLTK).
dnl
@@ -35,7 +35,7 @@ dnl FLTK library versions...
FL_MAJOR_VERSION=1
FL_MINOR_VERSION=1
FL_PATCH_VERSION=0
-FL_RELEASE_VERSION=rc6
+FL_RELEASE_VERSION=rc7
FL_API_VERSION=${FL_MAJOR_VERSION}.${FL_MINOR_VERSION}
AC_SUBST(FL_MAJOR_VERSION)
@@ -785,5 +785,5 @@ dnl Make sure the fltk-config script is executable...
chmod +x fltk-config
dnl
-dnl End of "$Id: configure.in,v 1.33.2.31.2.85 2002/08/12 19:42:54 easysw Exp $".
+dnl End of "$Id: configure.in,v 1.33.2.31.2.86 2002/09/17 20:27:17 easysw Exp $".
dnl
diff --git a/fltk.spec b/fltk.spec
index 3809a5615..6e56bd2a2 100644
--- a/fltk.spec
+++ b/fltk.spec
@@ -1,5 +1,5 @@
#
-# "$Id: fltk.spec,v 1.1.2.9.2.15 2002/08/12 19:42:54 easysw Exp $"
+# "$Id: fltk.spec,v 1.1.2.9.2.16 2002/09/17 20:27:17 easysw Exp $"
#
# RPM spec file for FLTK.
#
@@ -23,7 +23,7 @@
# Please report all bugs and problems to "fltk-bugs@fltk.org".
#
-%define version 1.1.0rc6
+%define version 1.1.0rc7
%define release 0
%define prefix /usr
@@ -97,5 +97,5 @@ rm -rf $RPM_BUILD_ROOT
%{prefix}/share/doc/fltk/*
#
-# End of "$Id: fltk.spec,v 1.1.2.9.2.15 2002/08/12 19:42:54 easysw Exp $".
+# End of "$Id: fltk.spec,v 1.1.2.9.2.16 2002/09/17 20:27:17 easysw Exp $".
#
diff --git a/src/Fl_PNM_Image.cxx b/src/Fl_PNM_Image.cxx
index c6de8ba15..5742357fe 100644
--- a/src/Fl_PNM_Image.cxx
+++ b/src/Fl_PNM_Image.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_PNM_Image.cxx,v 1.1.2.8 2002/05/27 21:16:47 easysw Exp $"
+// "$Id: Fl_PNM_Image.cxx,v 1.1.2.9 2002/09/17 20:27:18 easysw Exp $"
//
// Fl_PNM_Image routines.
//
@@ -83,6 +83,8 @@ Fl_PNM_Image::Fl_PNM_Image(const char *name) // I - File to read
format = atoi(lineptr);
while (isdigit(*lineptr)) lineptr ++;
+ if (format == 7) lineptr = "";
+
while (lineptr != NULL && w() == 0) {
if (*lineptr == '\0' || *lineptr == '#') {
lineptr = fgets(line, sizeof(line), fp);
@@ -155,6 +157,16 @@ Fl_PNM_Image::Fl_PNM_Image(const char *name) // I - File to read
case 6 :
fread(ptr, w(), d(), fp);
break;
+
+ case 7 : /* XV 3:3:2 thumbnail format */
+ for (x = w(); x > 0; x --) {
+ byte = getc(fp);
+
+ *ptr++ = 255 * ((byte >> 5) & 7) / 7;
+ *ptr++ = 255 * ((byte >> 2) & 7) / 7;
+ *ptr++ = 255 * (byte & 3) / 3;
+ }
+ break;
}
}
@@ -163,5 +175,5 @@ Fl_PNM_Image::Fl_PNM_Image(const char *name) // I - File to read
//
-// End of "$Id: Fl_PNM_Image.cxx,v 1.1.2.8 2002/05/27 21:16:47 easysw Exp $".
+// End of "$Id: Fl_PNM_Image.cxx,v 1.1.2.9 2002/09/17 20:27:18 easysw Exp $".
//
diff --git a/src/fl_images_core.cxx b/src/fl_images_core.cxx
index e83b22b26..8f6b6a26f 100644
--- a/src/fl_images_core.cxx
+++ b/src/fl_images_core.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fl_images_core.cxx,v 1.1.2.3 2002/08/09 01:09:49 easysw Exp $"
+// "$Id: fl_images_core.cxx,v 1.1.2.4 2002/09/17 20:27:19 easysw Exp $"
//
// FLTK images library core.
//
@@ -75,7 +75,7 @@ fl_check_images(const char *name, // I - Filename
if (memcmp(header, "BM", 2) == 0) // BMP file
return new Fl_BMP_Image(name);
- if (header[0] == 'P' && header[1] >= '1' && header[1] <= '6')
+ if (header[0] == 'P' && header[1] >= '1' && header[1] <= '7')
// Portable anymap
return new Fl_PNM_Image(name);
@@ -97,5 +97,5 @@ fl_check_images(const char *name, // I - Filename
//
-// End of "$Id: fl_images_core.cxx,v 1.1.2.3 2002/08/09 01:09:49 easysw Exp $".
+// End of "$Id: fl_images_core.cxx,v 1.1.2.4 2002/09/17 20:27:19 easysw Exp $".
//