2

How do I export Adobe Photoshop color table (.ACT) files as csv files?

2

Well, in photoshop you do not. But the file itself is just a list of 8bit binary rgb colors (according to adobe). So converting that to a csv should be pretty trivial to do with say python for example, you could also do it with jsx but its a bit more involved.

Here is a quick python example (quickly tested on the run):

#!/usr/bin/python
# -*- coding: utf-8 -*-
# act2csv.py quick script no warranties whatsoever
import struct
import csv

DATA = []

with open("test.act", "rb") as actFile:
    for _ in range(256):
        raw = actFile.read(3)
        color = struct.unpack("3B", raw)
        DATA.append(color)

with open('test.csv', 'wb') as csvfile:
    csvWriter = csv.writer(csvfile)
    csvWriter.writerows(DATA)
  • As I'm very new to this, Can you Please suggest step by step process of this. – Obeetee Pvt. Ltd. May 31 '17 at 8:44
  • Please do not add things that are not answers in answer fields. Once you have more than 10 points in participation then you can run this as a comment until then no dice. This question is perhaps meant for me i presume. Well you put the python code in a file and run that file with python. It will then unpack test.act into a csv file. But if you can not use python then start at: learnpython.org – joojaa May 31 '17 at 9:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.