Commit graph

64 commits

Author SHA1 Message Date
Fred Kiefer
288bf8cfbe Add drop in replacement code for libicns.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26829 72102866-910b-0410-8b05-ffd578937521
2008-09-03 07:02:34 +00:00
Gregory John Casamento
8b4277dcdc * configure: Regenerated file
* configure.ac: Added check for libicns. (http://icns.sourceforge.net/)
        * Headers/Additions/GNUstepGUI/config.h.in
        * Source/GNUmakefile: Added new files
        * Source/NSBitmapImageRep+ICNS.h: Header for ICNS category
        * Source/NSBitmapImageRep+ICNS.m: Implementation if ICNS reading
        logic.
        * Source/NSBitmapImageRep.m: Add support for the ICNS file 
        format so that GNUstep can read Mac OS X icon files.   Uses
        the libicns library available from sourceforge.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26805 72102866-910b-0410-8b05-ffd578937521
2008-08-12 04:58:04 +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
0d146e1c55 Small improvements on premultiplcation of alpha.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26276 72102866-910b-0410-8b05-ffd578937521
2008-03-11 20:11:53 +00:00
Fred Kiefer
2dabdc3270 In _premultiply and _unpremultiply flag the format as changed.
Add fast path for 8 bit images.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26131 72102866-910b-0410-8b05-ffd578937521
2008-02-25 15:35:57 +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
56b6a0ff3e Do all bitmap image drawing via GSDrawImage:: to allow better
implementations in backends.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25600 72102866-910b-0410-8b05-ffd578937521
2007-11-22 10:47:33 +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
Fred Kiefer
d9445dfd53 Add MacOSX 10.4 methods and constants.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25359 72102866-910b-0410-8b05-ffd578937521
2007-07-26 17:55:36 +00:00
Richard Frith-MacDonald
bc34ad5f62 Document some typedefs
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24351 72102866-910b-0410-8b05-ffd578937521
2007-01-15 10:18:24 +00:00
Mark Tracy
311911e218 Autogsdoc comments for Source/NSBitmapImageRep.m
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24196 72102866-910b-0410-8b05-ffd578937521
2006-12-10 09:46:21 +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
Richard Frith-MacDonald
57435da7d5 tidyups and minor theme tiling updates.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23871 72102866-910b-0410-8b05-ffd578937521
2006-10-15 08:34:47 +00:00
Gregory John Casamento
84d0296b74 Correction for GSNibCompatibility. Added coding to classes for keyed archiving.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23225 72102866-910b-0410-8b05-ffd578937521
2006-08-09 01:37:32 +00:00
Fabien Vallon
b566e2c30b Improved documentation
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@22037 72102866-910b-0410-8b05-ffd578937521
2005-11-18 14:38:23 +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
Adam Fedor
bc6d45f6f7 * configure.ac: Check for libgif
* Source/NSBitmapImageRep+GIF.m: Support libgif
* Source/NSBitmapImageRem.m: Idem. (Fixes Bug #12362).


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20936 72102866-910b-0410-8b05-ffd578937521
2005-03-21 16:12:02 +00:00
Alexander Malmberg
cc5de74696 2005-01-18 16:39 Alexander Malmberg <alexander@malmberg.org>
* Source/NSBitmapImageRep.m
	(-TIFFRepresentationUsingCompression:factor:): Don't use pointer
	comparisons to compare strings. Handle both device and calibrated
	colorspaces. Warn if the colorspace isn't recognized.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20579 72102866-910b-0410-8b05-ffd578937521
2005-01-18 15:35:51 +00:00
Fred Kiefer
5271b53ebe Some more keyed decoding.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20216 72102866-910b-0410-8b05-ffd578937521
2004-10-10 22:36:02 +00:00
Alexander Malmberg
9cd4d1cc7f Document GSReadRect and update users.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@19801 72102866-910b-0410-8b05-ffd578937521
2004-07-30 13:58:03 +00:00
Alexander Malmberg
edc0a6f614 Remove obsolete libwraster image loading hacks.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18533 72102866-910b-0410-8b05-ffd578937521
2004-02-03 22:42:15 +00:00
Alexander Malmberg
896c4cb1a3 Add GIF loader.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18339 72102866-910b-0410-8b05-ffd578937521
2004-01-08 18:43:49 +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
Adam Fedor
50ed66958a Implement GSReadRect and initWithFocusedViewRect:
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17687 72102866-910b-0410-8b05-ffd578937521
2003-09-20 02:57:45 +00:00
Adam Fedor
bbeec6b247 Better error checking and documentation
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17638 72102866-910b-0410-8b05-ffd578937521
2003-09-08 02:07:53 +00:00
Fred Kiefer
1a94f30ba2 [canInitWithData:], [imageRepsWithData:] and [initWithData:]
protect against data being nil. [imageRepsWithFile:] check if the
file exists and only return an array when it contains objects.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17591 72102866-910b-0410-8b05-ffd578937521
2003-09-01 16:58:27 +00:00
David Ayers
b18f1c4ac4 Header reorganization - Please refer to ChangeLog
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17408 72102866-910b-0410-8b05-ffd578937521
2003-07-31 23:52:10 +00:00
Fred Kiefer
677b253c54 In [_initFromTIFFImage:number:] free the info returned by
NSTiffGetInfo().


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17342 72102866-910b-0410-8b05-ffd578937521
2003-07-25 22:54:28 +00:00
Adam Fedor
6be9174933 Include <> -> ""
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16917 72102866-910b-0410-8b05-ffd578937521
2003-06-13 15:01:12 +00:00
Fred Kiefer
634aafc1de In [initWithBitmapDataPlanes:...bitsPerPixel:],
[getBitmapDataPlanes:] and [copyWithZone:] changed type of i
to unsigned int.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16887 72102866-910b-0410-8b05-ffd578937521
2003-06-08 00:26:18 +00:00
Fred Kiefer
6f303709e5 In [imageUnfilteredFileTypes] add the tiff entries always to the
front of the list. As the standard GNUstep images are in this
format, this will speed up image loading.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16200 72102866-910b-0410-8b05-ffd578937521
2003-03-18 23:47:23 +00:00
Fred Kiefer
86711c9522 In [TIFFRepresentationUsingCompression:factor:] set extraSamples
and correct compression type if 0.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15245 72102866-910b-0410-8b05-ffd578937521
2002-12-05 00:37:01 +00:00
Adam Fedor
5e12263244 Warning and if check fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14944 72102866-910b-0410-8b05-ffd578937521
2002-11-06 15:44:36 +00:00
Adam Fedor
4b54ab9f06 New AppKit events. Updates for autogsdoc
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@12217 72102866-910b-0410-8b05-ffd578937521
2002-01-26 04:14:38 +00:00
Adam Fedor
d47e202fbe Markup for autogsdoc
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11788 72102866-910b-0410-8b05-ffd578937521
2001-12-17 16:51:51 +00:00
Adam Fedor
94398b3eda Fix image encoding
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10827 72102866-910b-0410-8b05-ffd578937521
2001-09-01 04:20:55 +00:00
Nicola Pero
87d19de51f Fixed crash on checking whether it can init with data, if data is not
actually a tiff


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10811 72102866-910b-0410-8b05-ffd578937521
2001-08-30 17:26:47 +00:00
Fred Kiefer
f9054d3ecf Implemented [TIFFRepresentationOfImageRepsInArray] and
[TIFFRepresentationOfImageRepsInArray:usingCompression:factor:]


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10678 72102866-910b-0410-8b05-ffd578937521
2001-08-11 18:33:40 +00:00
Adam Fedor
6fc3726a02 Fixes to compile shared on Windows
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10611 72102866-910b-0410-8b05-ffd578937521
2001-07-30 21:30:51 +00:00
Nicola Pero
2aeff3e0f0 Temporary bug fix to make it work again for non-tiff files
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10171 72102866-910b-0410-8b05-ffd578937521
2001-06-12 22:19:10 +00:00
Nicola Pero
918c047557 Indentation and trivial efficiency fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10170 72102866-910b-0410-8b05-ffd578937521
2001-06-12 22:15:49 +00:00
Nicola Pero
c532921093 Tidied indentation
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10121 72102866-910b-0410-8b05-ffd578937521
2001-06-08 22:51:11 +00:00
Fred Kiefer
32317597eb Moved code to create the _imageData into
[initWithBitmapDataPlanes:...] and corrected [copyWithZone:]


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10118 72102866-910b-0410-8b05-ffd578937521
2001-06-08 16:44:05 +00:00
Fred Kiefer
9642bac4ec Removed methods implemented by superclass.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10114 72102866-910b-0410-8b05-ffd578937521
2001-06-07 21:56:19 +00:00
Fred Kiefer
e2080f1aa3 Dummy implementation for new methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@8430 72102866-910b-0410-8b05-ffd578937521
2000-12-24 14:06:06 +00:00
Fred Kiefer
43d41776c0 Adopted to changes in header file.
Moved code from [TIFFRepresentation] to
[TIFFRepresentationUsingCompression:factor:] and call this.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@8423 72102866-910b-0410-8b05-ffd578937521
2000-12-23 14:21:34 +00:00
Adam Fedor
c604091e89 Image improvements.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6481 72102866-910b-0410-8b05-ffd578937521
2000-04-18 16:58:14 +00:00
Adam Fedor
c256b1df22 View display an tiff improvements
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6463 72102866-910b-0410-8b05-ffd578937521
2000-04-13 19:23:16 +00:00
Adam Fedor
a839409855 Update draw
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5651 72102866-910b-0410-8b05-ffd578937521
2000-01-03 16:05:22 +00:00
Adam Fedor
b21f64ae64 opaqueness check
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5636 72102866-910b-0410-8b05-ffd578937521
1999-12-28 20:26:07 +00:00