// For complete examples and data files, please go to https://github.com/aspose-psd/Aspose.PSD-for-.NET string inputFile = "input.psd"; string outputFile = "output.psd"; // Open the input file as a stream using (FileStream stream = new FileStream(inputFile, FileMode.Open, FileAccess.Read)) { // Load the PSD image using (PsdImage psdImage = (PsdImage)Image.Load(stream)) { // Create a new layer and add it to the PSD image Layer layer = new Layer(psdImage); psdImage.AddLayer(layer); // Manipulate the pixel data int[] pixels = layer.LoadArgb32Pixels(layer.Bounds); for (int i = 0; i < pixels.Length; i++) { if (i % 5 == 0) { pixels[i] = 0xFF0000; // Example manipulation } } layer.SaveArgb32Pixels(layer.Bounds, pixels); // Save the PSD image psdImage.Save(outputFile); } }