-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support to TIFF extra sample. #136
Conversation
PR Summary
|
if (extraSamples > 0) | ||
processExtraSamples(zip, mzip, outBuf, samplePerPixel, bitsPerSample, w, height); | ||
else | ||
zip.Write(outBuf, 0, outBuf.Length); |
Check warning
Code scanning / CodeQL
Dereferenced variable may be null Warning
zip
this
Variable
zip
this
if (extraSamples > 0) | ||
processExtraSamples(zip, mzip, outBuf, samplePerPixel, bitsPerSample, w, height); | ||
else | ||
zip.Write(outBuf, 0, outBuf.Length); |
Check warning
Code scanning / CodeQL
Dereferenced variable may be null Warning
outBuf
this
Variable
outBuf
this
Variable
outBuf
this
Variable
outBuf
this
@@ -600,7 +612,7 @@ | |||
else | |||
{ | |||
zip.Close(); | |||
img = Image.GetInstance(w, h, samplePerPixel, bitsPerSample, stream.ToArray()); | |||
img = Image.GetInstance(w, h, samplePerPixel - extraSamples, bitsPerSample, stream.ToArray()); |
Check warning
Code scanning / CodeQL
Dereferenced variable may be null Warning
stream
this
@@ -661,10 +673,37 @@ | |||
{ | |||
img.InitialRotation = rotation; | |||
} | |||
|
|||
if (extraSamples > 0) { | |||
mzip.Close(); |
Check warning
Code scanning / CodeQL
Dereferenced variable may be null Warning
mzip
this
|
||
if (extraSamples > 0) { | ||
mzip.Close(); | ||
var mimg = Image.GetInstance(w, h, 1, bitsPerSample, mstream.ToArray()); |
Check warning
Code scanning / CodeQL
Dereferenced variable may be null Warning
Reading a TIFF image that include a TIFF Tag extra samples.