mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 02:04:20 +00:00
Get alpha with 2 parameters
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6467 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
efc1b3a0db
commit
456220f857
2 changed files with 9 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2000-04-16 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* Source/tiff.m (NSTiffGetInfo): Getting alpha info requires
|
||||
two parameters!
|
||||
|
||||
2000-04-14 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSSliderCell.m: Fix stupid mistake in last mod.
|
||||
|
|
|
@ -266,6 +266,7 @@ NSTiffInfo *
|
|||
NSTiffGetInfo(int imageNumber, TIFF* image)
|
||||
{
|
||||
NSTiffInfo* info;
|
||||
u_short *sample_info = NULL;
|
||||
|
||||
if (image == NULL)
|
||||
return NULL;
|
||||
|
@ -283,7 +284,9 @@ NSTiffGetInfo(int imageNumber, TIFF* image)
|
|||
TIFFGetField(image, TIFFTAG_COMPRESSION, &info->compression);
|
||||
TIFFGetField(image, TIFFTAG_JPEGQUALITY, &info->quality);
|
||||
TIFFGetField(image, TIFFTAG_SUBFILETYPE, &info->subfileType);
|
||||
TIFFGetField(image, TIFFTAG_EXTRASAMPLES, &info->extraSamples);
|
||||
TIFFGetField(image, TIFFTAG_EXTRASAMPLES, &info->extraSamples, &sample_info);
|
||||
if (info->extraSamples == EXTRASAMPLE_ASSOCALPHA && sample_info)
|
||||
info->extraSamples = sample_info[0];
|
||||
|
||||
/* If the following tags aren't present then use the TIFF defaults. */
|
||||
TIFFGetFieldDefaulted(image, TIFFTAG_BITSPERSAMPLE, &info->bitsPerSample);
|
||||
|
|
Loading…
Reference in a new issue