Skip navigation
Currently Being Moderated

Convert Image from Plugin

Jun 29, 2012 3:40 AM

Hi Everyone,

 

i have added a button in file menu by using AI SDK , now i want to convert an AI image into a JPEG format.

 

Can anyone please tell me that how  will it be possible??

 

Will it be possible by using the same SDK API or i will have to run a script file on this  button click event.

 

 

Regards

Harsh

 
Replies
  • Currently Being Moderated
    Jun 29, 2012 7:14 AM   in reply to Harsh V Sharma

    We export to JPG manually, so its definitely doable in just pure code (though you may need to do some pixel crunching and/or need a 3rd party library).

     

    There are some methods for exporting to Jpeg natively though I haven't used them. AIImageOpitimizatioSuite::AsJEPG() takes an art handle and sends the raw data to an AIDataFilter (presumably as a stream of JPEG bytes you could just write out? I'm not sure). You could try that first, see how that works.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 3, 2012 7:44 AM   in reply to Harsh V Sharma

    AIImageOptimization.h -- sorry, dropped an 'n' in there. I meant AIImageOptimizationSuite, not AIImageOptimizatioSuite!

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points