Skip to content

Commit c4d45fd

Browse files
committed
Fix alpha channel regression in gradientmap filter
Regressed in 02335c7
1 parent 239088c commit c4d45fd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/modules/plus/filter_gradientmap.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ static int sliced_proc(int id, int index, int jobs, void *data)
196196
float r = (float) p[i] / 255.0;
197197
float g = (float) p[i + 1] / 255.0;
198198
float b = (float) p[i + 2] / 255.0;
199-
float a = (float) p[i + 3] / 255.0;
199+
float a = (float) p[i + 3];
200200
mlt_color c = gradient_map(*desc->colors, r, g, b, a);
201201
p[i] = c.r;
202202
p[i + 1] = c.g;
@@ -212,7 +212,7 @@ static int sliced_proc(int id, int index, int jobs, void *data)
212212
float r = (float) p[i] / 65535.0;
213213
float g = (float) p[i + 1] / 65535.0;
214214
float b = (float) p[i + 2] / 65535.0;
215-
float a = (float) p[i + 3] / 65535.0;
215+
float a = (float) p[i + 3] / 257.0;
216216
mlt_color c = gradient_map(*desc->colors, r, g, b, a);
217217
p[i] = (uint16_t) c.r * 257;
218218
p[i + 1] = (uint16_t) c.g * 257;

0 commit comments

Comments
 (0)