Reading PSD file format

后端 未结 11 1217
时光说笑
时光说笑 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:14

    You can use GroupDocs.Viewer for .NET API to render your PSD files as images (JPG, PNG, BMP) in your application using a few lines of code.

    C#

    ViewerConfig config = new ViewerConfig();
    config.StoragePath = "D:\\storage\\";
    
    // Create handler
    ViewerImageHandler imageHandler = new ViewerImageHandler(config);
    
    // Guid implies that unique document name 
    string guid = "sample.psd";
    
    // Get document pages as images
    List pages = imageHandler.GetPages(guid);
    
    foreach (PageImage page in pages)
    {
        // Access each image using page.Stream
    }
    

    For more details and sample code, please visit here. Disclosure: I work as a Developer Evangelist at GroupDocs.

提交回复
热议问题