Skip to content

Commit

Permalink
Fix TaskColorCorrect
Browse files Browse the repository at this point in the history
  • Loading branch information
blackwarthog authored and morevnaproject committed Feb 26, 2016
1 parent 4427801 commit 4a14d9b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ TaskColorCorrectSW::run(RunParams & /* params */) const
if (r.valid())
{
VectorInt offset = get_offset();
RectInt ra = sub_task()->get_target_rect() + r.get_min() + get_offset();
RectInt ra = sub_task()->get_target_rect() + r.get_min() + offset;
if (ra.valid())
{
etl::set_intersect(ra, ra, r);
Expand All @@ -175,7 +175,7 @@ TaskColorCorrectSW::run(RunParams & /* params */) const
synfig::Surface::pen pa = c.get_pen(ra.minx, ra.maxx);
for(int y = ra.miny; y < ra.maxy; ++y)
{
const Color *ca = &a[y - r.miny + offset[1]][ra.minx - r.minx + offset[0]];
const Color *ca = &a[y - r.miny - offset[1]][ra.minx - r.minx - offset[0]];
Color *cc = &c[y][ra.minx];
for(int x = ra.minx; x < ra.maxx; ++x, ++ca, ++cc)
correct_pixel(*cc, *ca, hue_adjust, shift, amplifier, g);
Expand Down

0 comments on commit 4a14d9b

Please sign in to comment.