[scribus-dev] python: Pillow?

dockattt katttdoc at gmail.com
Mon Nov 12 19:38:34 UTC 2018


yes, to get back to my last post on the Pillow question.  I finally 
found some docs in the manual about the bit depth:

https://pillow.readthedocs.io/en/5.3.x/handbook/concepts.html

"


    Modes

The |mode| of an image defines the type and depth of a pixel in the 
image. The current release supports the following standard modes:

      * |1| (1-bit pixels, black and white, stored with one pixel per byte)
      * |L| (8-bit pixels, black and white)
      * |P| (8-bit pixels, mapped to any other mode using a color palette)
      * |RGB| (3x8-bit pixels, true color)
      * |RGBA| (4x8-bit pixels, true color with transparency mask)
      * |CMYK| (4x8-bit pixels, color separation)
      * |YCbCr| (3x8-bit pixels, color video format)
          o Note that this refers to the JPEG, and not the ITU-R
            BT.2020, standard
      * |LAB| (3x8-bit pixels, the L*a*b color space)
      * |HSV| (3x8-bit pixels, Hue, Saturation, Value color space)
      * |I| (32-bit signed integer pixels)
      * |F| (32-bit floating point pixels)"


    So it doesn't appear that it can go beyond 8 bit pixels except in
    the I and F modes.  So I guess if you had a 16 bit image you'd need
    to write some special code, maybe interact with the I or F modes. ???




On 11/11/18 9:05 AM, Gregory Pittman wrote:
> On 11/11/18 4:11 AM, ale rimoldi wrote:
>> hi doc kattt
>>> I was just curious if anyone has ever talked about adding the Python
>>> package "Pillow" to Scribus.  It's a fork of PIL(Python Image
>>> Library). I was able to import it into the Scribus python by adding
>>> it's path from a different python to the sys.path list. I was using
>>> it to do some image stuff.  Maybe I have the right idea of just
>>> adding it to the path? ;)
>>
>> i think that installing python packages the way you normally do in
>> python.
>>
>> starting adding packages to scribus itself is imo a bad idea...
>>
>> if one day it will be possible to create more complex workflows with
>> the scripter, it would probably be nice if scribus could
>> "automatically" load a virtual environment before running the script.
>> that way you could install (and document) packages for a single script.
>>
> If you're using Windows, Jean tells me that in order to use a system Python and any additional packages, all you need to do is to go to the Scribus directory in Windows and look for the directory named 'python'. Change that name to anything else and Scribus will look to the system for Python -- just make sure it's at least 2.7 or better.
>
> Greg
>
>
> _______________________________________________
> scribus-dev mailing list
> scribus-dev at lists.scribus.net
> http://lists.scribus.net/mailman/listinfo/scribus-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scribus.net/pipermail/scribus-dev/attachments/20181112/574e21ac/attachment.html>


More information about the scribus-dev mailing list