Aspose.PSD for Java保存图片乱码及有些属性读取不全,没.net版本全

@seankerdy please check the following image. (I temporary installed font):
comparison.jpg (771.5 KB)

The main differences are:sometimes different font weights, harder shadows, minor padding issues in the orange rectangle.

Please specify the most critical issue for you, I’ll create for the investigation if it possible to render more similar to Adobe Photoshop.

For the demo I used Aspose.PSD 22.10 for .Net.

@seankerdy 请检查下图。 (我临时安装的字体)::
comparison.jpg (771.5 KB)

主要区别是:有时不同的字体粗细、较硬的阴影、橙色矩形中的小填充问题。

请为您指定最关键的问题,如果可以渲染更类似于 Adob​​e Photoshop,我将创建以供调查。

对于演示,我使用了 Aspose.PSD 22.10 for .Net。

麻烦请教一下你们的示例代码是怎么样的?我们怎么导出的效果跟您这边差异这么大的,奇怪

@seankerdy please note that I used PsdLoadOptions with LoadEffectsResource = true;
And as I wrote it’s a .Net version. We will try to release Java version as soon as possible.

    using (var image = (PsdImage)Image.Load(sourceFile, new PsdLoadOptions() { LoadEffectsResource = true } ))
    {
        ImageOptionsBase optionsBase = new JpegOptions() { Quality = 80 };
        image.Save(outputFile, optionsBase);
    }

很奇怪,我这边也是你这个代码,但是我这边出来的效果跟你那边完全不一样,不知道是什么原因.字体我都安装过的。
我这边的代码:
string name = “商品拍摄与图片处理技能第一套-修改”;
string fileName = string.Format(“E:\Apose\{0}.psd”,name);
using (var psdImage = (PsdImage)Aspose.PSD.Image.Load(fileName, new PsdLoadOptions() {LoadEffectsResource = true}))
{
{

            try
            {
                string outPath = string.Format("E:\\Apose\\{0}.jpg",name);
                ImageOptionsBase optionsBase = new JpegOptions() { Quality = 80 };
                psdImage.Save(outPath, optionsBase);
            }
            catch (Exception exception)
            {
                var msg=exception.Message;
            }
        
           
        }

这个是保存的效果图: 商品拍摄与图片处理技能第一套-修改.jpg (174.3 KB)
使用的软件版本: 1.png (14.4 KB)
2.jpg (274.6 KB)

@seankerdy I used .net 6 configuration. To make it works properly should be added the following packages:
Aspose.PSD (22.10.0),
System.Drawing.Common (6.0.0),
System.Text.Encoding.CodepPages (6.0.0).

But the rendering using .Net Framework 2, 3.5 and 4 should work likewise.

I additionally tried to use Release Version 22.10 without license it also renders font very similar to the original Photoshop Rendering.

output.jpg (498.3 KB)

Please check if the STHupo font installed. And could you please additionally clarify what’s OS is used.

windows 10 企业版

我在window 10 用.net 6 也不行,还生成不了图片,用的是控制台程序

能方便您把整个代码打包发一下可以吗?

今天我用鞋子psd保存图表效果图出来的差异很大,不知道是什么原因
下面是保存的效果图
鞋子-参考答案.jpg (65.4 KB)
psd文件:鞋子-参考答案.zip (1.7 MB)

Please check the following project
PsdQA.zip (4.1 MB)

If you have different font on the rendered image please ensure you install all needed fonts.
According to you images the issue in the font STHupo.

我的效果还是老样子,STHupo我这边是安装的

运行你打包的代码也不行,真是太奇怪了

@seankerdy

Could you please update project that I shared with you with the following code:

 var loadOptions = new PsdLoadOptions() { LoadEffectsResource = true };
 var defFontFolder = FontSettings.GetDefaultFontsFolders();
 var fontFolder = FontSettings.GetFontsFolders();
 var fontName = FontSettings.GetAdobeFontName("STHupo");            
 FontSettings.Reset(); 
 FontSettings.UpdateFonts();

  using (PsdImage image = (PsdImage)Image.Load(sourceFile, loadOptions))
  {
          image.Save(outputPng, new PngOptions() { ColorType = Aspose.PSD.FileFormats.Png.PngColorType.TruecolorWithAlpha } );
                image.Save(outputJpg, new JpegOptions() { Quality = 80 });
   }

Please share with me value of the variables:

defFontFolder, fontFolder, fontName 

If they contains confidential information you can text me with direct message.

读取字体乱码13.png (5.5 KB)
13.png (5.5 KB)QQ图片20221028174242.png (312.9 KB)

附上psd文件:手表字体乱码.zip (6.9 MB)

@seankerdy I created additional issue:
PSDNET-1342: Text layer name is garbled if was used Chinese Characters

Could you please clarify did you try make the steps I wrote before to find the issue with the Fonts?

Automatic translate:
我创建了其他问题:
PSDNET-1342:如果使用中文字符,文本图层名称会出现乱码

您能否澄清一下您是否尝试按照我之前写的步骤来查找字体问题?

字体楷体是中文window系统自带的字体,另外麻烦问一下新的java版本啥时候能更新?

@seankerdy
Aspose.PSD for Java release is still in work

Automatic translate:
PSD for Java 版本仍在工作中

提示_innerException|{"算术运算导致溢出。附件见上传的错1.zip (7.0 MB)

@seankerdy I created new task PSDJAVA-410: InnerException - Arithmetic operations cause overflow on the processing of specific file.

Could you please provide the source code to help us to reproduce this issue.

using (var psdImage = (PsdImage)Aspose.PSD.Image.Load(fileName, new PsdLoadOptions() {LoadEffectsResource = true})) 这句,另外新版本的java计划啥时候更新发布呢?