Exporting a picture in photoshop format

  1. 6 years ago

    Robert B

    19 Jun 2013 Pre-Release Testers, Xojo Pro University of Connecticut

    When Quicktime is installed, ExportPicture is stated to support a multitude of formats (see Language Reference). When Xojo is compiled for carbon, all of these are present. But when compiled for the Cocoa framework, only a few are available: JPEG, JPEG-2000, OpenEXR, PDF, PNG and TIFF. Most of my users wish to save pictures in photoshop (.psd) format, and that format is missing. Others that are missing include: BMP, PICT, SGI, TGA, and QuickTime, but nobody wants these so no problem.

    Unfortunately, many of my users require export in photoshop format. They claim that tiff files are too big, and pdf files are too compressed. Also, some want to place these files directly into illustrator, and photoshop is the best format for controlling size and color balance.

    Can someone help me figure out how to export a picture in photoshop? I have the monkeybread plugins, but none provides a photoshop export option as far as I can tell. The solution needs to be cross platform as half of my users use Windows XP/7/8.

    Thanks

  2. Joe R

    19 Jun 2013 Xojo Inc
    Edited 6 years ago

    For what it's worth, the reason there are different options under the Cocoa framework is that we're using ImageKit instead of the deprecated QuickTime graphics exporters.

  3. Robert B

    19 Jun 2013 Pre-Release Testers, Xojo Pro University of Connecticut

    Thanks for the explanation. But as near as I can tell, ImageKit does not have exporters, only filters. I guess I need to figure out how to get access to the deprecated QuickTime graphics exporters.

  4. Joe R

    19 Jun 2013 Xojo Inc

    @Robert B Thanks for the explanation. But as near as I can tell, ImageKit does not have exporters, only filters. I guess I need to figure out how to get access to the deprecated QuickTime graphics exporters.

    ImageKit doesn't do the exporting -- just the presentation of the save options (via IKSaveOptions in an NSSavePanel ). The actual exporting is done via ImageIO (specifically CGImageDestination ).

    Apple's IKImageViewDemo has code in it that's extremely close to what we do internally. See saveImage: and savePanelDidEnd:returnCode:.

  5. Joe R

    19 Jun 2013 Xojo Inc
    Edited 6 years ago

    And if you're just after the ability to save a picture as PSD and don't need the type picker, it gets a lot easier. I can give you the necessary declares for dealing with ImageIO. It obviously won't help you much on Windows and Linux, but I'm not familiar with those platforms.

  6. Robert B

    19 Jun 2013 Pre-Release Testers, Xojo Pro University of Connecticut

    Dear Joe,

    I would really appreciate your sending me the declares (rbirge@uconn.edu) or posting them here. I already have a windows solution. It is the cocoa environment causing the problem. And I would like to use cocoa. My programs run under cocoa for the first time thanks to Xojo. Exportpicture shortcomings are the only obstacle to delivering a cocoa version right now.

    Many thanks for your help.

  7. Joe R

    19 Jun 2013 Xojo Inc
    Edited 6 years ago

    @Robert B Dear Joe,

    I would really appreciate your sending me the declares (rbirge@uconn.edu) or posting them here. I already have a windows solution. It is the cocoa environment causing the problem. And I would like to use cocoa. My programs run under cocoa for the first time thanks to Xojo. Exportpicture shortcomings are the only obstacle to delivering a cocoa version right now.

    Many thanks for your help.

    Actually, it turns out that you can use Picture.GetData to get the picture object as PSD data on OS X. Here's an example (with error handling omitted for clarity):

      dim destination as FolderItem = // ...
      dim thePicture as Picture = // ...
      dim data as MemoryBlock = thePicture.GetData( "com.adobe.photoshop-image" )
      dim stream as BinaryStream = BinaryStream.Create( destination )
      stream.Write( data )
      stream.Close()
  8. Robert B

    20 Jun 2013 Pre-Release Testers, Xojo Pro University of Connecticut

    Dear Joe,

    This solves my problem. Thanks for your help.

    Bob

  9. Sam R

    20 Jun 2013 Pre-Release Testers, Xojo Pro, Third Party Store Hengchun, Pingtung, Taiwan

    Check back with me later this year, I've started work on the ability to export layered Photoshop documents from Xojo, currently I've had to pause it as I have to work on a different project.

  10. last week

    Valdemar D

    Dec 1 Pre-Release Testers, Xojo Pro Europe ( France, Paris )

    @Sam R Check back with me later this year, I've started work on the ability to export layered Photoshop documents from Xojo, currently I've had to pause it as I have to work on a different project.

    @Sam R have some code to export PSD layered files ? :)

  11. Sam R

    Dec 1 Pre-Release Testers, Xojo Pro, Third Party Store Hengchun, Pingtung, Taiwan

    I never did get this completed.

or Sign Up to reply!