Set color profile?

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
thatkeith
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 346
Joined: Mon Mar 01, 2010 7:13 pm
Location: London, UK
Contact:

Set color profile?

Post by thatkeith » Sat Sep 17, 2022 5:31 pm

I made a tool for generating resized copies of images, a simple helper tool for a project, and also a practical demonstration of LiveCode's potential. It's working as expected... except for one thing: when I test with an image that is not set to sRGB (in my test case a photo from an iPhone, so it's set to Display P3 instead) the output is set to sRGB and saturated colours are noticeably more dull.

Does LiveCode handle color profiles at all, in any way? Is there any way to script converting an image's profile to a different one?
Technical Writer, Meta
University Lecturer
Technical Editor, MacUser (1996-2015)
360 VR media specialist

thatkeith
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 346
Joined: Mon Mar 01, 2010 7:13 pm
Location: London, UK
Contact:

Re: Set color profile?

Post by thatkeith » Mon Oct 03, 2022 4:47 pm

I have found something that seems promising, although I haven't had time to test it out yet. It uses Terminal (so a shell command) and exiftool:
Mac OS Terminal.app command line code to recursively embedd an sRGB ICC profile in all JPG files under a top level directory, overwriting original files without creating backups:

exiftool -overwrite_original -ext jpg '-ICC_Profile<=/Library/Application Support/Adobe/Color/Profiles/Recommended/sRGB Color Space Profile.icm' -r '/Users/username/Desktop/input file or folder'
MS Windows OS command line code to recursively embedd an sRGB ICC profile in all JPG files under a top level directory, overwriting original files without creating backups:

exiftool -overwrite_original -ext jpg "-ICC_Profile<=C:\Windows\System32\spool\drivers\color\sRGB Color Space Profile.icm" -r "C:\Users\username\Desktop\input file or folder"
Source: https://community.adobe.com/t5/photosho ... p/10135229
Technical Writer, Meta
University Lecturer
Technical Editor, MacUser (1996-2015)
360 VR media specialist

Post Reply

Return to “Talking LiveCode”