created illustrator plugin but i want how to get artboard image in base64 string

New Here ,
Jan 23, 2020 Jan 23, 2020

Copy link to clipboard

Copied

I created iluustrator plugin and i want c++ code for get base64 of artboard image  

TOPICS
How to, SDK, Third party plugins

Views

426

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Most Valuable Participant ,
Jan 24, 2020 Jan 24, 2020

Copy link to clipboard

Copied

What underlying format do you want to encapsulate - converting anything to base64 is the trivial part, it's getting the "image " that is the work.

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 24, 2020 Jan 24, 2020

Copy link to clipboard

Copied

i want PNG format

 

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Most Valuable Participant ,
Jan 24, 2020 Jan 24, 2020

Copy link to clipboard

Copied

I do not have the Illustrator SDK at the moment, but if there is no command to give the artboard as raster - I would not expect to find such an option - then you probably would need to export as PNG, then open as a file and finally Base64 encode it.

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 24, 2020 Jan 24, 2020

Copy link to clipboard

Copied

You can use Rasterize Suite (RasterizeWithPadding if you want to rasterize only part of document, you need to provide bounds, you can calculate artboard bounds or you can use RasterizeDocument if you want to rasterize whole document).

 

Using Rasterize Suite you will get new raster type art object. Then use Image Optimization Suite with Data Filter Suite to convert raster to PNG.

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 20, 2021 Jan 20, 2021

Copy link to clipboard

Copied

Thanks a lot! I was looking for this information all around the internet. You made my day. 

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines