Aspose.PSD for .NET cant get warping to work in my smartobjects

Hello,
I’m testing PSD files with smart objects with warping but for some reason we cant get the custom warping to work. Any help would be appreciated.

@AmrSalama72

To enable custom warping for smart objects in your PSD files using Aspose.PSD for .NET, you need to ensure that you are using the correct loading options that allow for warp transformations. Here’s a sample code snippet that demonstrates how to achieve this:

using System;
using System.IO;
using Aspose.PSD.FileFormats.Psd;
using Aspose.PSD.ImageLoadOptions;
using Aspose.PSD.ImageOptions;

namespace Aspose.PSD.Examples.Aspose.SmartObjects
{
    public class SupportOfWarpTransformationToSmartObject
    {
        public static void Run()
        {
            // Define the paths for the source and output files
            string baseDir = RunExamples.GetDataDir_PSD();
            string outputDir = RunExamples.GetDataDir_Output();

            // Specify the source PSD file and output file names
            string sourceFile = Path.Combine(baseDir, "source.psd");
            string pngWarpedExport = Path.Combine(outputDir, "warped.png");
            string psdWarpedExport = Path.Combine(outputDir, "warpFile.psd");

            // Set the loading options to allow warp repaint
            var warpLoadOptions = new PsdLoadOptions() { AllowWarpRepaint = true };

            // Load the PSD image with the specified options
            using (var image = (PsdImage)Image.Load(sourceFile, warpLoadOptions))
            {
                // Save the warped image in PNG and PSD formats
                image.Save(pngWarpedExport, new PngOptions());
                image.Save(psdWarpedExport, new PsdOptions());
            }

            Console.WriteLine("Warp transformation executed successfully");
        }
    }
}

In this example, the key part is setting AllowWarpRepaint to true in the PsdLoadOptions. This allows the warp transformations to be applied correctly when loading the PSD file. Make sure that your source PSD file contains the smart objects with the desired warp effects.

If you continue to experience issues, double-check the structure of your PSD file and ensure that the smart objects are set up correctly for warping.

@AmrSalama72 could you please provide the input file and source code that was used. Aspose.PSD supports most types of Warp Transformation but they are not pixel-perfect in comparison with Photoshop rendering.

Hello,
here it is, the warping. psd is the original psd file with the warping effect and the png file is for testing and the warping_output.psd is the output without the warping effect. Any help would be appreciated.

@AmrSalama72
I’ve checked the code and input file and can confirm issue. It looks like the provided PSD file has specific structures, that affects rendering and Aspose.PSD can not apply warp transformation correctly.

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

Issue ID(s): PSDNET-2253

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.

I’m new and ready to buy the service, but I find that the deformation of the intelligence layer is currently imperfect, right? I saw other netizens say that the deformation of the intelligent layer is incorrect. And sawtooth

@LiXinChen improvement of Smart Object Layer Rendering is the one the priority task for Team. But at this moment Aspose.PSD can’t render Smart Object Warp Deformation Pixel-Perfect but we improve rendering every month. Could you please provide the input file that you you need to render, this can help us to prioritize the work.

04.zip (9.1 MB)

03.zip (6.8 MB)

No, the smart layer replaces the picture, and the deformation remains the same, isn’t there a function for this? I can’t use this PSD tool right now. Who can save me

@LiXinChen I’ve replied in this post. Was created ticket using files that were provided on this page. Psd smartLayer issue - #4 by Dmitriy.Sorokin