mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 02:04:20 +00:00
Fix image unacrhiving
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10831 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c804059843
commit
09193da35a
3 changed files with 15 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2001-09-01 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* Source/NSImage.m ([NSImage -initWithCoder:]): Create _reps array
|
||||
before adding representations.
|
||||
* Source/tiff.m (NSTiffWrite): Archive alpha info.
|
||||
|
||||
2001-09-01 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Headers/gnustep/gui/NSMenuItemCell.h
|
||||
|
|
|
@ -1017,6 +1017,7 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
|
|||
{
|
||||
BOOL flag;
|
||||
|
||||
_reps = [[NSMutableArray alloc] initWithCapacity: 2];
|
||||
[coder decodeValueOfObjCType: @encode(BOOL) at: &flag];
|
||||
if (flag == YES)
|
||||
{
|
||||
|
|
|
@ -445,6 +445,7 @@ int
|
|||
NSTiffWrite(TIFF* image, NSTiffInfo* info, char* data)
|
||||
{
|
||||
tdata_t buf = (tdata_t)data;
|
||||
uint16 sample_info[2];
|
||||
int i;
|
||||
int row;
|
||||
int error = 0;
|
||||
|
@ -460,6 +461,13 @@ NSTiffWrite(TIFF* image, NSTiffInfo* info, char* data)
|
|||
TIFFSetField(image, TIFFTAG_PLANARCONFIG, info->planarConfig);
|
||||
TIFFSetField(image, TIFFTAG_PHOTOMETRIC, info->photoInterp);
|
||||
|
||||
if (info->assocAlpha)
|
||||
sample_info[0] = EXTRASAMPLE_ASSOCALPHA;
|
||||
else
|
||||
sample_info[0] = EXTRASAMPLE_UNASSALPHA;
|
||||
if (info->extraSamples)
|
||||
TIFFSetField(image, TIFFTAG_EXTRASAMPLES, 1, sample_info);
|
||||
|
||||
switch (info->photoInterp)
|
||||
{
|
||||
case PHOTOMETRIC_MINISBLACK:
|
||||
|
|
Loading…
Reference in a new issue