• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Looking to return a byte array (bitmap) from a layer.

Engaged ,
Jan 31, 2018 Jan 31, 2018

Copy link to clipboard

Copied

Is this possible to get the pixel data of a layer? I need to stream the bitmap to my application.

TOPICS
Actions and scripting

Views

993

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
Adobe
LEGEND ,
Jan 31, 2018 Jan 31, 2018

Copy link to clipboard

Copied

Save your layer as .jpg file to disk and try this method: Performance Issues - Read Color Informations

Votes

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
Engaged ,
Feb 01, 2018 Feb 01, 2018

Copy link to clipboard

Copied

I'm trying to stream to my service, (keep in memory) is there anyway I can get around not having to save to disk? If I have to go that route anyways~ I can just import the .jpg directly I would like to not have to do that if I can.

Thanks for the reply!

Votes

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
LEGEND ,
Feb 01, 2018 Feb 01, 2018

Copy link to clipboard

Copied

Performance Issues - Read Color Informations updated. See how connect Br from Ps and store Bitmap Data in variable.

Votes

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
Engaged ,
Feb 01, 2018 Feb 01, 2018

Copy link to clipboard

Copied

I'm sorry one last question, I'm not fluent in JS so bear with me, it still seems you're creating and saving out a bitmap then reading it?

Or is that getting the current canvas pixels with 'function reading(v)'?

Votes

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
LEGEND ,
Feb 01, 2018 Feb 01, 2018

Copy link to clipboard

Copied

LATEST

Actually in second script (that connecting with Bridge) I don't save a file to disk, however it must be saved before you read its Bitmap Data. There is no way to do it quite fast by Photoshop without reading saved file. If you did that with samplers on live image that took ages selecting each single px to check its value. So I do not save file, however had if it wasn't saved yet.

Votes

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