You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Fixed #708: length and filesize do not match
settings.SetDefines(new BmpReadDefines
{
IgnoreFileSize = true,
});
// Fix RAW color
settings.SetDefines(new DngReadDefines()
{
UseCameraWhitebalance = true,
OutputColor = DngOutputColor.SRGB,
ReadThumbnail = true,
});
The text was updated successfully, but these errors were encountered:
Charltsing
changed the title
CannelCount=2, but Cannels.Count=1 when load a gray jpg ?
Why CannelCount=2, but Cannels.Count=1 when load a gray jpg ?
Dec 25, 2023
That is happening because ChannelCount includes the index channel but the Channels property doesn't. I don't know why I did that but I just pushed a patch to also include the Index channel.
Magick.NET version
13.3.3
Environment (Operating system, version and so on)
Windows10, net framework 4.7.2
Description
CannelCount=2, but Cannels.Count=1 when load a gray jpg ?
it is jpg image
img.zip
Steps to Reproduce
byte[] picbyte = File.ReadAllBytes(fullpath);
using (MagickImage magickimage = new MagickImage(picbyte, settings))
settings as follow :
var settings = new MagickReadSettings
{
// #1077
SyncImageWithExifProfile = true,
SyncImageWithTiffProperties = true,
};
if (extname.Equals(".SVG", StringComparison.OrdinalIgnoreCase))
{
settings.BackgroundColor = MagickColors.Transparent;
settings.SetDefine("svg:xml-parse-huge", "true");
}
else if (extname.Equals(".HEIC", StringComparison.OrdinalIgnoreCase) ||
extname.Equals(".HEIF", StringComparison.OrdinalIgnoreCase))
{
settings.SetDefines(new HeicReadDefines
{
PreserveOrientation = true,
DepthImage = true,
});
}
else if (extname.Equals(".JP2", StringComparison.OrdinalIgnoreCase))
{
settings.SetDefines(new Jp2ReadDefines
{
QualityLayers = 100,
});
}
else if (extname.Equals(".TIF", StringComparison.OrdinalIgnoreCase) ||
extname.Equals(".TIFF", StringComparison.OrdinalIgnoreCase))
{
settings.SetDefines(new TiffReadDefines
{
IgnoreTags = new[] {
// Issue d2phap/ImageGlass#1454
"34022", // ColorTable
"34025", // ImageColorValue
"34026", // BackgroundColorValue
},
});
}
// Fixed #708: length and filesize do not match
settings.SetDefines(new BmpReadDefines
{
IgnoreFileSize = true,
});
// Fix RAW color
settings.SetDefines(new DngReadDefines()
{
UseCameraWhitebalance = true,
OutputColor = DngOutputColor.SRGB,
ReadThumbnail = true,
});
The text was updated successfully, but these errors were encountered: