Saving Image with different ColorProfile

  • Hello,
    I am stuck with a problem where I try to open an image in ImageObject() apply a .dotScreen filter on it and save it again.
    Now I always end up with an image saved with RGB profile but I would like to generate an image just black and white — no color information.
    I looked into the documentation and first I thought it has something to do with colorSpace() but I guess that is not the case.
    So I ended up by the saving options and I think that imageColorSyncProfileData is actually what I am looking for. But I do not understand how to work with it.

    For further interest I would be keen to know if there is a way to convert images into different profiles. Especially thinking about print production where I maybe need certain ICC-Profiles.

    I am happy for any help or information for a solution.
    Thank you.

  • hello @imik,

    I think conversions between color modes and color profiles are better handled with PIL/Pillow.

    here’s a small script to convert a .png image to grayscale (thanks @frederik for the example):

    from PIL import Image
    img ='image.png').convert('LA')'greyscale.png')

    you can install and use Pillow from inside DrawBot using the new pip installer:

    1. go to the menu Python > Install Python packages…
    2. choose Install/Upgrade and type Pillow

    hops this helps… good luck!

  • Hey @gferreira,
    thank you for you reply! I will have a more detailed look into the PIL-Library but I think that's it for the moment. 🙂
    Still, if you have some further information or any idea where to find something about the imageColorSyncProfileData and how to use it that would be great! Always happy to learn something new.

    Have a great day. 🙂

Log in to reply