Reading PSD file format

后端 未结 11 1213
时光说笑
时光说笑 2020-12-04 11:13

I wonder if this is even possible. I have an application that adds a context menu when you right click a file. It all works fine but here is what I\'d like to do:

If

11条回答
  •  不思量自难忘°
    2020-12-04 12:18

    The ImageMagick libraries (which provide bindings for C#) also support the PSD format. They might be easier to get started with than getting into the Paint.NET code and also come with a quite free (BSD-like) license.

    A simple sample (found at http://midimick.com/magicknet/magickDoc.html) using MagickNet would look like this:

    using System;
    
    static void Main(string[] args)
    {
        MagickNet.Magick.Init();
        MagicNet.Image img = new MagicNet.Image("file.psd");
        img.Resize(System.Drawing.Size(100,100));
        img.Write("newFile.png");
        MagickNet.Magick.Term();
    }
    

    Note: MagickNet has moved to http://www.codeproject.com/KB/dotnet/ImageMagick_in_VBNET.aspx

提交回复
热议问题