Skip to content
Snippets Groups Projects
Commit b9e5ccb1 authored by Per Hedbor's avatar Per Hedbor
Browse files

Bugfix for transparency

Rev: lib/modules/_Image_PSD.pmod:1.10
parent f09afa04
No related branches found
No related tags found
No related merge requests found
...@@ -107,7 +107,7 @@ Layer decode_layer(mapping layer, mapping i) ...@@ -107,7 +107,7 @@ Layer decode_layer(mapping layer, mapping i)
else else
lays += (({ Image.Layer( ([ lays += (({ Image.Layer( ([
"image":___decode_image_channel(l->width, l->height, c->data), "image":___decode_image_channel(l->width, l->height, c->data),
"alpha_value":1.0, // "alpha_value":1.0,
"mode":mode, "mode":mode,
]) ) ]) )
})); }));
...@@ -310,7 +310,8 @@ array decode_layers( string|mapping what, mapping|void opts ) ...@@ -310,7 +310,8 @@ array decode_layers( string|mapping what, mapping|void opts )
{ {
Image.Layer lay = Image.Layer( l->image, l->alpha, m ); Image.Layer lay = Image.Layer( l->image, l->alpha, m );
l->image = 0; l->alpha = 0; l->image = 0; l->alpha = 0;
lay->set_alpha_value( l->opacity / 255.0 ); if( l->opacity != 255 )
lay->set_alpha_value( 1.0 - l->opacity / 255.0 );
lay->set_offset( l->xoffset, l->yoffset ); lay->set_offset( l->xoffset, l->yoffset );
layers += ({ lay }); layers += ({ lay });
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment