PsdImage -> set resolution

Hello,
When creating a new PSD from scratch, adding layers pictures etc. then PsdImage.save.
The resolution is 72dpi, no matter what I do.

I tried:

PsdImage newPsd = new PsdImage(6000, 4004);
newPsd.SetResolution(300, 300);

PsdOptions psdOptions = new PsdOptions()
{
ResolutionSettings = new ResolutionSetting()
{
HorizontalResolution = 300,
VerticalResolution = 300
}
};
newPsd.Save(outputfile, psdOptions);

No chance to get a Psd with 300dpi

thx for your support

@BjE

I can confirm the issue.

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PSDNET-1560

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

Please check the following code until the issue will be resolved:

           using (PsdImage newPsd = (PsdImage)new PsdImage(6000, 4004))
           {
               newPsd.ImageResources = new ResourceBlock[] { new ResolutionInfoResource() };
               newPsd.VerticalResolution = 350;
               newPsd.HorizontalResolution = 350;
               newPsd.Save(outputfile);
           }
1 Like

Hey Dimitriy,

with your workaround it’s possible to creat 300dpi psd.

Many thanks for your support :+1:

1 Like

The issues you have found earlier (filed as PSDNET-1560) have been fixed in this update. This message was posted using Bugs notification tool by yaroslav.lisovskyi