Skip to content

Commit

Permalink
https://github.com/ImageMagick/ImageMagick6/issues/168
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Nov 14, 2021
1 parent cd9d52c commit 55fc1ab
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions coders/psd.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,11 +422,11 @@ static MagickBooleanType ApplyPSDLayerOpacity(Image *image,Quantum opacity,
for (x=0; x < (ssize_t) image->columns; x++)
{
if (revert == MagickFalse)
SetPixelAlpha(image,(Quantum) (QuantumScale*(GetPixelAlpha(image,q))*
opacity),q);
SetPixelAlpha(image,ClampToQuantum(QuantumScale*
GetPixelAlpha(image,q)*opacity),q);
else if (opacity > 0)
SetPixelAlpha(image,(Quantum) (QuantumRange*(GetPixelAlpha(image,q)/
(MagickRealType) opacity)),q);
SetPixelAlpha(image,ClampToQuantum((double) QuantumRange*
GetPixelAlpha(image,q)/(MagickRealType) opacity),q);
q+=GetPixelChannels(image);
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
Expand Down Expand Up @@ -1477,7 +1477,7 @@ static MagickBooleanType ReadPSDChannel(Image *image,
(IsStringTrue(option) == MagickFalse)))
{
(void) SeekBlob(image,(MagickOffsetType)
layer_info->channel_info[channel].size-2,SEEK_CUR);
(layer_info->channel_info[channel].size-2),SEEK_CUR);
return(MagickTrue);
}
mask=CloneImage(image,layer_info->mask.page.width,
Expand Down

0 comments on commit 55fc1ab

Please sign in to comment.