Problem with save PSD to JPG

Hello Team,

I have 2 problems that need your help to support :

  1. I want to save Psd to JPG but it works incorrectly. I attached 2 files PSD original and JPG file after generated that you help you to compare and see the issue.
    Also, I used your link as: PSD converter into raster image formats. to convert PSD to JPG online and that has the same issue.

ConvertJPGIssue.7z (1.4 MB)

  1. I want to add new TextLayer with new Font and Color but the current method doesn’t have support change new Font.
    Current Method : public TextLayer AddTextLayer(string text, Rectangle rect);

These issues above very important to me and I really need your help. Please help me to check and let me know the solution. I’m waiting for respone from you.

Thanks,
Duy

Can you please share the used sample code along with which API version you have used on your end.

I have shared my feedback with you in another forum thread for possible options at the moment.

Hi @mudassir.fayyaz,

using (PsdImage image = (PsdImage)Aspose.PSD.Image.Load(filePath))
		{
			JpegOptions jpegOptions = new JpegOptions();
			jpegOptions.Quality = 12;
			// Convert PSD to JPG
			image.Save(fileName, jpegOptions);
		}

I just load Psd and save it to JPG used the Aspose.PSD version 21.5.0.

Hi @mudassir.fayyaz,

I have a new PSD as an attached file.
PSDConverter.7z (1.7 MB)

I also test this file for convert PSD to jpeg in link: PSD converter into raster image formats., I can see it works but when using the code “image.Save(fileName, jpegOptions);” , the image generated incorrect.

Please help me to check the code in nutget.

Thanks,
Duy

@nlduy157

We are working over the concerned PSD abs will get back to you with feedback as soon as possible.

@nlduy157

Can you please consider saving as PNG rather JPEG as JPEG does not support transparency.

Hi @mudassir.fayyaz,

I also saving as PNG but the issue is still happening.
M1PDTT26052021001.png (229.1 KB)

@nlduy157

Can you please try using following sample code.

using (PsdImage image = (PsdImage)Aspose.PSD.Image.Load(filePath))
 {
      var options = new PngOptions()
      {
            ColorType =PngColorType.TruecolorWithAlpha
      });
      image.Save(fileName, options);
        }

Hi @mudassir.fayyaz,

I have tried it as the same code you shared. But It still error
M1PDTT26052021001.png (314.6 KB)

@nlduy157

Please check the comparison image of two snapshots that you have shared. The bottom one is the one with PngColorType.TruecolorWithAlpha settings. What issue you are observing as background seems to be fine with this setting.
image.jpg (567.2 KB)