Commit graph

19 commits

Author SHA1 Message Date
Marcian Lytwyn
6315d5f4b0 Merge Source/NSBimapImageRep,GIF,JPEG,PNG files
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@38662 72102866-910b-0410-8b05-ffd578937521
2015-06-20 16:37:34 +00:00
Frank Le Grand
4b27157a46 Merged Trunk changes from rev 35219 to TestPlant branch.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@36953 72102866-910b-0410-8b05-ffd578937521
2013-08-09 14:24:48 +00:00
Eric Wasylishen
7362d7314d * Source/NSBitmapImageRep+PNG.m:
HACK: PNG can not represent 72DPI exactly. If the pixels-per-meter value is
near 72DPI, assume it is exactly 72 DPI. Note that the same problem occurrs
at 144DPI, or 288DPI... so don't use PNG for resolution independent graphics.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34127 72102866-910b-0410-8b05-ffd578937521
2011-11-06 22:31:23 +00:00
Eric Wasylishen
96450245fe * Source/NSBitmapImageRep+PNG.m: Read DPI metadata in PNG files
and use this to set the point size of the image rep


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32916 72102866-910b-0410-8b05-ffd578937521
2011-04-20 21:41:17 +00:00
Riccardo Mottola
85a6f46fc2 Tweak png.h header order to avoid problems on some systems
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32017 72102866-910b-0410-8b05-ffd578937521
2011-02-08 18:50:52 +00:00
Riccardo Mottola
14328a34f3 Cleaned up includes so that compilation without PNG works again
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32014 72102866-910b-0410-8b05-ffd578937521
2011-02-08 16:14:12 +00:00
Fred Kiefer
63744bc165 PNG patch by Thomase Klausner.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31970 72102866-910b-0410-8b05-ffd578937521
2011-01-29 14:44:01 +00:00
Gregory John Casamento
513ebb1947 * Source/NSBitmapImageRep+PNG.m: Reverting change which removed
check for setjmp.  This was causing a compilation error.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30474 72102866-910b-0410-8b05-ffd578937521
2010-05-29 15:27:59 +00:00
Riccardo Mottola
80dd8c94d0 Skip libpng's check for setjmp. I hope we are indeed correct.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30453 72102866-910b-0410-8b05-ffd578937521
2010-05-25 11:00:03 +00:00
Fred Kiefer
d9172838aa Small corrections to last commit.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30449 72102866-910b-0410-8b05-ffd578937521
2010-05-24 19:30:49 +00:00
Fred Kiefer
99e273a57d few compiler warning fixes plus a lot of #import replacement.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30448 72102866-910b-0410-8b05-ffd578937521
2010-05-24 10:48:14 +00:00
Jonathan Gillaspie
84cab6659c Remove PNG is experimental log
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29693 72102866-910b-0410-8b05-ffd578937521
2010-02-20 19:16:20 +00:00
Adam Fedor
65c1408219 Look for location of png.h
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27894 72102866-910b-0410-8b05-ffd578937521
2009-02-16 23:23:41 +00:00
Adam Fedor
7afdd32ac1 Revert library license version to 2 until applications can be converted
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26619 72102866-910b-0410-8b05-ffd578937521
2008-06-10 04:01:49 +00:00
Fred Kiefer
5efc693137 Better support for transparent images and more image formats.
Add background image in info panel.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26043 72102866-910b-0410-8b05-ffd578937521
2008-02-08 22:40:38 +00:00
Fred Kiefer
193e31e678 Change all files to use GPL 3 and LGPL 3.
Prepare for next release.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25536 72102866-910b-0410-8b05-ffd578937521
2007-10-29 21:16:17 +00:00
Mark Tracy
9f633f60f6 Change Log
Mon. 20-Nov-2006 Mark Tracy <tracy454 at concentric dot net>
Many changes related to bitmap images

1.  NSBitmapImateRep attribute global strings were not defined
    Fix: add definitions to externs.h, and declarations to NSBitmapImageRep.h
    Comment: Two strings defined in Cocoa were commented out: NSImageColorSyncData
      is proprietary to Apple, and NSImageEXIFData has no support elsewhere in
      GNUstep. I propose adding GSImageICCProfileData if and when color management
      is added to GNUstep.

2.  LZW compression in TIFF was disabled for lack of a test of its availability
    Fix: Implement NSTiffIsCodecConfigured(codec) in tiff.m
    Comment: As of libtiff-3.7.0, there is a function call in the API to test
      availability at runtime. For libtiff-3.6.0 (earlier?) there are macros
      #defined in tiffconf.h. The implementation check the library version at
      compile time, and uses one of the two methods. I have not tested the 
      second method for lack of an installation of an old libtiff.

3.  -canCompressUsing: relied on a static list of capabilities
    Fix: Use the new NSTiffIsCodecConfigured(codec) in NSBitmapImageRep.m
    Comment: The static list could be wrong, as it was on my system. Also
      eliminate the supports_lzw_compression flag.

4.  +getTIFFCompressionTypes:count: relied on a static list of compressors.
    Fix: Use the new NSTiffIsCodecConfigured(codec) in NSBitmapImageRep.m
    Comment: Compares GNUstep supported compressors against actual availability.
      Also change the private instance methods _localFromCompressionType and 
      _compressionTypeFromLocal to private class methods so that they can be used
      in -initWithTIFFImage:number: and -TIFFRepresentationUsingCompression:factor:
      and +getTIFFCompressionTypes:count: This is probably a clumsy implementation
      but it works.

5.  -setProperty:toValue: and -valueForProperty: were not implemented
    Fix: Add a new instance variable NSMutableDictionary * _properties to 
      NSBitmapImageRep.h and implemented accessors in NSBitmapImageRep.m. Patch
      -_initFromTIFFImage to set compression type and factor in _properties.
    Comment: This feature is used to pass options to and from JPEG, PNG, TIFF, and
      GIF in Cocoa, although the docs are kind of vague. In one case the Cocoa docs
      said the properties were set when reading a TIFF, but the implementation
      didn't; I chose to implement the docs. Cocoa does use properties when 
      exporting bitmaps, so I implemented that.

6.  Checked and updated NSBitmapImageFileType in NSBitmapImageRep.h
    Fix: confirmed the enumeration values against Cocoa, and added 
      NSJPEG2000FileType = 5
    Comment: JPEG-2000 is not implemented, just reserved a space for it.

7.  -representationUsingType:properties: was not implemented
    Fix: Implement export of TIFF, JPEG, GIF and PNG in NSBitmapImage.m
    Comment: See the change notes for JPEG, GIF, and PNG for more. BMP and JPEG-2000
      are not implemented; they just log a message to that effect. As apparently
      Cocoa does it this way, if you pass nil for properties, it falls back to 
      the internal _properties, and if that is empty, there are some safe defaults.

8.  +representationfOfImageRepsInArray:UsingType:properties: was not implemented
    Fix: Partially implement in NSBitmapImageRep.m
    Comment: I just stole the incomplete code from
      +TIFFRepresentationOfImageRepsInArray: since I have yet to find an explanation
      of how this really ought to work.

9.  JPEG export didn't handle alpha channel, properties or errors.
    Fix: Add -_JPEGRepresentationWithProperties:errorMessage: to
      NSBitmapImageRep+JPEG.h and greatly rework Nicolas Roard's code in
      NSBitmapImageRep+JPEG.m. Patch -_initBitmapFromJPEG:errorMessage to
      write properties.
    Comment: Major rewrite of Nicolas Roard's JPEG export code. 
    To do: Support for planar bitmaps and support for colorspaces other than
      RGB(A).

10. PNG export not implemented
    Fix: Add -_PNGRepresentationWithProperties: to
      NSBitmapImageRep+PNG.h and implement NSBitmapImageRep+PNG.m
    Comment: No support yet for planar bitmaps. Only supports 
      NS*WhiteColorSpace and NS*RGBColorSpace. Does support alpha. Support for
      reading and writing NSImageGamma is experimental. In keeping with Cocoa,
      the property NSImageGamma ranges from 0.0 to 1.0; representing the range
      of minimum supported gamma to maximum supported gamma, in this case 1.0
      to 2.5. This is in contrast to GNUstep where by convention the property
      would range from 0.0 to 255.0.
    To do: proper error message support

11. GIF export not implemented
    Fix: Add -_GIFRepresentationWithPropterties:errorMessage: to
      NSBitmapImageRep+GIF.h and implement in NSBitmapImageRep+GIF.m
    Comments: Supports only RGB(A) colorspaces, but ignores alpha. Supports
      planar or interleaved bitmaps. Supports properties NSImageRGBColorTable.

12. -_initBitmapFromGIF:errorMessage: did not support transparency
    Fix: Don't ignore control blocks in NSBitmapImageRep+GIF.m; check for
      transparency.
    Comment: If a transparent color is found, it adds an alpha channel to the 
      bitmap. Also, save the color table in properties.

13. -_initBitmapFromGIF:errorMessage: would show the last image in a 
      multi-image GIF file
    Fix: Break the parsing loop after the first image in NSBitmapImageRep+GIF.m
    Comment: Also check for frame duration, and set that property. There is not
      yet any support for animated GIF. This will require some additional 
      infrastructure, and I won't do it unless asked.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24140 72102866-910b-0410-8b05-ffd578937521
2006-11-21 06:36:26 +00:00
Adam Fedor
303dd1baf9 Update FSF Address.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@21259 72102866-910b-0410-8b05-ffd578937521
2005-05-26 02:52:46 +00:00
Alexander Malmberg
3f7866a8ed Add new image loaders.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18331 72102866-910b-0410-8b05-ffd578937521
2004-01-07 23:53:15 +00:00