Browse Source

Fix decoder scope issue

Former-commit-id: ca50cdd8efb68d5d312dfd8e53852d4f00c1671f
Former-commit-id: e9698d8e7c43a772280f46aabf2098897a06c871
Former-commit-id: 6ea60a611bcfca0858972a09ed43d2909b242303
pull/17/head
James Jackson-South 11 years ago
parent
commit
8c4e2a611b
  1. 5
      src/ImageProcessor/Formats/Gif/GifDecoderCore.cs

5
src/ImageProcessor/Formats/Gif/GifDecoderCore.cs

@ -405,8 +405,7 @@ namespace ImageProcessor.Formats
{ {
if (this.graphicsControlExtension.DisposalMethod == DisposalMethod.RestoreToBackground) if (this.graphicsControlExtension.DisposalMethod == DisposalMethod.RestoreToBackground)
{ {
Parallel.For(descriptor.Top, descriptor.Top + descriptor.Height, for (int y = descriptor.Top; y < descriptor.Top + descriptor.Height; y++)
y =>
{ {
for (int x = descriptor.Left; x < descriptor.Left + descriptor.Width; x++) for (int x = descriptor.Left; x < descriptor.Left + descriptor.Width; x++)
{ {
@ -418,7 +417,7 @@ namespace ImageProcessor.Formats
this.currentFrame[offset + 2] = 0; this.currentFrame[offset + 2] = 0;
this.currentFrame[offset + 3] = 0; this.currentFrame[offset + 3] = 0;
} }
}); }
} }
else if (this.graphicsControlExtension.DisposalMethod == DisposalMethod.RestoreToPrevious) else if (this.graphicsControlExtension.DisposalMethod == DisposalMethod.RestoreToPrevious)
{ {

Loading…
Cancel
Save