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
This commit is contained in:
parent
11bf9b28da
commit
0792860a57
7
CHANGES
7
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
|
||||
|
@ -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
|
||||
|
@ -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 $".
|
||||
#
|
||||
|
@ -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 $".
|
||||
//
|
||||
|
@ -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 $".
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user