mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 21:50:46 +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
1f635e3e0b
commit
97bfbf5304
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>
|
2001-09-01 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Headers/gnustep/gui/NSMenuItemCell.h
|
* Headers/gnustep/gui/NSMenuItemCell.h
|
||||||
|
|
|
@ -1017,6 +1017,7 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
|
||||||
{
|
{
|
||||||
BOOL flag;
|
BOOL flag;
|
||||||
|
|
||||||
|
_reps = [[NSMutableArray alloc] initWithCapacity: 2];
|
||||||
[coder decodeValueOfObjCType: @encode(BOOL) at: &flag];
|
[coder decodeValueOfObjCType: @encode(BOOL) at: &flag];
|
||||||
if (flag == YES)
|
if (flag == YES)
|
||||||
{
|
{
|
||||||
|
|
|
@ -445,6 +445,7 @@ int
|
||||||
NSTiffWrite(TIFF* image, NSTiffInfo* info, char* data)
|
NSTiffWrite(TIFF* image, NSTiffInfo* info, char* data)
|
||||||
{
|
{
|
||||||
tdata_t buf = (tdata_t)data;
|
tdata_t buf = (tdata_t)data;
|
||||||
|
uint16 sample_info[2];
|
||||||
int i;
|
int i;
|
||||||
int row;
|
int row;
|
||||||
int error = 0;
|
int error = 0;
|
||||||
|
@ -460,6 +461,13 @@ NSTiffWrite(TIFF* image, NSTiffInfo* info, char* data)
|
||||||
TIFFSetField(image, TIFFTAG_PLANARCONFIG, info->planarConfig);
|
TIFFSetField(image, TIFFTAG_PLANARCONFIG, info->planarConfig);
|
||||||
TIFFSetField(image, TIFFTAG_PHOTOMETRIC, info->photoInterp);
|
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)
|
switch (info->photoInterp)
|
||||||
{
|
{
|
||||||
case PHOTOMETRIC_MINISBLACK:
|
case PHOTOMETRIC_MINISBLACK:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue