Jpg转psd怎么保证图片属性不损失

Snipaste_2022-09-05_13-56-02.jpg (196.9 KB)
JPG图片dpi为240
转换psd的dpi为72

你好, @17609231559,
你能分享导致错误的图像样本吗?

原图150.jpg (256.7 KB)

你好,我这边测试每张图都是dpi变小了,这个怎么保证转换的不损失属性

谢谢您的回复。 让我测试你的样品,这样我就可以给你反馈。

@17609231559 I moved this topic to the Aspose.PSD Forum because you use Aspose.PSD. Could you please provide the code you placed on the image as a text, to help us investigate the issue.

Automatic translate:
@17609231559 因为您使用 Aspose.PSD,所以我将此主题移至 Aspose.PSD 论坛。您能否以文本形式提供您放置在图像上的代码,以帮助我们调查问题。

public class test {

public static void main(String[] args) throws FileNotFoundException {
    String fileName = "C:\\Users\\09072732\\Desktop\\可馨相册(配片)\\150.jpg";
    InputStream inputStream1 =  new FileInputStream(fileName);

// Initialize PsdImage class object
PsdImage image = new PsdImage(900, 700);
image.setXmpData(new XmpPacketWrapper());
image.setUseRawData(true);
// Load input image into FileStream object
InputStream inputStream = new FileInputStream(fileName);
Layer layer = null;
try
{
layer = new Layer(inputStream);
// Add input image as layer to PSD image
image.addLayer(layer);
}
catch (Exception e)
{
if (layer != null)
{
layer.dispose();
}
throw e;
}
// Convert JPG image to output PSD file
image.save(“150PSD.psd”);
System.out.println(“完成”);

}

这样可以吗

@17609231559 I created a task: PSDJAVA-395: When convert Jpg to psd there is no way to ensure that the image attributes are not lost. After the investigation you will be notifed with the results.

请问 jpg转psd怎么保证图片属性不损失问题有结果了吗

@17609231559 Aspose.PSD can not open JPG without adding it as a layer by design. We will make additional investigation in the PSDJAVA-395 to help you and other customers bypass this limitation.

Automatic translate:
Aspose.PSD 无法打开 JPG 而不将其添加为设计的图层。我们将在 PSDJAVA-395 中进行额外调查,以帮助您和其他客户绕过此限制。

请问 Jpg转psd保证图片属性不损失的调查有结果了吗

@17609231559 we are working on the Aspose.PSD for Java Release, until it’s done we can not plan any Aspose.PSD for Java tasks.