• Global community
    • Language:
      • Deutsch
      • English
      • EspaƱol
      • FranƧais
      • PortuguĆŖs
  • ę—„ęœ¬čŖžć‚³ćƒŸćƒ„ćƒ‹ćƒ†ć‚£
    Dedicated community for Japanese speakers
  • ķ•œźµ­ ģ»¤ė®¤ė‹ˆķ‹°
    Dedicated community for Korean speakers
Exit
3

How to use Base64 Image in Photoshop?

Community Beginner ,
Sep 04, 2023 Sep 04, 2023

Copy link to clipboard

Copied

Hello. Due to my work, I receive a lot of Base64 images, which I always have to convert to PNG to use in Photoshop. With one or two files this is not a problem, but with a large amount it is tedious and repetitive work. Currently I use an online converter, but it takes a lot of time to upload, convert, download, import into Photoshop, so I would like to improve my workflow and speed it up.

Can you offer me a solution?

 

I almost forgot: I use Windows 10.

TOPICS
Windows

Views

1.5K

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

correct answers 1 Correct answer

Community Expert , Sep 05, 2023 Sep 05, 2023

An example from the Mac... The process would be similar if you install Python3 in Windows.

 

Here is the cross platform Python3 script code as linked previously. This is the decode.py file:

 

2023-09-05_22-32-22.png

 

The input.txt file in the user's download folder has three base64 encoded strings, one per line for each image:

2023-09-05_22-39-34.png

 

2023-09-05_22-43-25.png

 

Working in the Downloads folder, here is the python3 command line code in Terminal.app:

 

2023-09-05_22-34-17.png

 

The output images are written to the root/top-level user account "home" folder (not the Downlo

...

Votes

Translate

Translate
Adobe
Community Expert ,
Sep 04, 2023 Sep 04, 2023

Copy link to clipboard

Copied

These would be text files, wouldn't they? The binary image data is encoded into ASCII text.

 

I'd suggest that you search the web for:

 

windows batch decode base64 to image

 

 

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
Community Beginner ,
Sep 05, 2023 Sep 05, 2023

Copy link to clipboard

Copied

They arrive in a database, from where I can export them to, for example, a .csv file.

Then I would need a batch file to split .csv and decode it one by one.

Thanks for the tip, I will try it.

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
Community Expert ,
Sep 05, 2023 Sep 05, 2023

Copy link to clipboard

Copied

quote

They arrive in a database, from where I can export them to, for example, a .csv file.

Then I would need a batch file to split .csv and decode it one by one.

Thanks for the tip, I will try it.


By @Csaba32068154j718

 

Although JavaScript can decode Base64 into an image for display in a ScriptUI interface, I am not aware of a way to render and save actual image files.

 

This turns out to be surprisingly simple in Python!

 

https://stackoverflow.com/questions/67736290/how-to-convert-more-than-one-base64-format-to-pictures-...

 

https://superuser.com/questions/1498215/how-to-bulk-convert-base64-to-images-in-an-excel-file

 

https://ideone.com/dKPiVz

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
Community Expert ,
Sep 05, 2023 Sep 05, 2023

Copy link to clipboard

Copied

An example from the Mac... The process would be similar if you install Python3 in Windows.

 

Here is the cross platform Python3 script code as linked previously. This is the decode.py file:

 

2023-09-05_22-32-22.png

 

The input.txt file in the user's download folder has three base64 encoded strings, one per line for each image:

2023-09-05_22-39-34.png

 

2023-09-05_22-43-25.png

 

Working in the Downloads folder, here is the python3 command line code in Terminal.app:

 

2023-09-05_22-34-17.png

 

The output images are written to the root/top-level user account "home" folder (not the Downloads folder):

 

image0001.png

image0002.png

image0003.png

 

Obviously a whole lot more can be done, however this is a simple way to batch convert locally.

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
Mentor ,
Sep 05, 2023 Sep 05, 2023

Copy link to clipboard

Copied

As an alternative to quickly convert Base64 images: the latest betas of PhotoLine support pasting Base64 directly and converts it to an image. Handy and quick if you have a smaller batch to convert.

 

CTRL-E will create a new image and paste the converted Base64 code with just one keyboard action. šŸ™‚

The latest beta can be downloaded here:

https://www.pl32.com/forum3/viewtopic.php?f=1&t=6964

 

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
Community Expert ,
Sep 08, 2023 Sep 08, 2023

Copy link to clipboard

Copied

@Csaba32068154j718 

 

Where did you end up on this project?

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
Community Beginner ,
Sep 09, 2023 Sep 09, 2023

Copy link to clipboard

Copied

Along the lines of your Python idea, I created a JavaScript code using ChatGPT that basically does what you suggested. Thanks a lot for your help.

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
Community Expert ,
Sep 09, 2023 Sep 09, 2023

Copy link to clipboard

Copied

LATEST
quote

Along the lines of your Python idea, I created a JavaScript code using ChatGPT that basically does what you suggested. Thanks a lot for your help.


By @Csaba32068154j718

 

Please do share the JSX code! I would have offered it if I could, but once I found an existing Python script I stopped my research.

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