I have a PSD trying to save PNG but it write incorrect PNG file.
On the other hand, saving to JPG and PSD is fine. Seems only PNG is broken.
Please fix it ASAP.
input2.zip (51.7 KB)
Sample Code:
public static void Run()
{
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_PSD();
// make changes in layer names and save it
using (var image = (PsdImage)Image.Load(dataDir +"/input2.psd"))
{
for (int i = 0; i < image.Layers.Length; i++)
{
var layer = image.Layers[i];
// Turn off everything inside a group
if (layer is FileFormats.Psd.Layers.LayerGroup)
{
layer.IsVisible = false;
}
}
image.Save(dataDir +" /output2.psd");
image.Save(dataDir +" /output2.png", new PsdOptions());
image.Save(dataDir +" /output2.jpg", new JpegOptions());
}
}