[python-win32] DoAction problem
Sylvain.Fejoz at ville-ge.ch
Sylvain.Fejoz at ville-ge.ch
Fri Jul 26 11:05:26 EDT 2019
My photoshop action is doing :
- Open
- Smart sharpen
- Convert to Profile current document
- Save
- Close
If Pillow is also able of "smart sharpening" and "converting to Profile
current document", your suggestion is very promising.
Is there any place on the Web where I can find reference to psApp tasks
like "DoAction", "Export", the parameters they need, etc.? It seems that
it is not so easy. Well, this is maybe again a very naive question.
Thank you.
De : "Tim Roberts" <timr at probo.com>
A : "Python-Win32 List" <python-win32 at python.org>
Date : 26.07.2019 00:54
Objet : Re: [python-win32] DoAction problem
Envoyé par : "python-win32"
<python-win32-bounces+sylvain.fejoz=ville-ge.ch at python.org>
Sylvain.Fejoz at ville-ge.ch wrote:
> Some little progress :
> Problematic code modified :
> psApp.DoAction('jpg_q8','Default Actions') # where 'jpg_q8' is the
> recorded action and 'Default Actions' the folder where the action is
> saved.
Right -- the "action set" in Photoshop terms.
> No more error message, but... no result : my tif files are not
> transformed to jpg files.
The Python part is now working. WE have no way of knowing what your
Photoshop action is doing. Is it actually doing the save, or do you
need to call psApp.Export?
And, by the way, if ALL you need to do is convert TIF to JPG, you
certainly do not need to launch the Photoshop behemoth for that. Just
use pip to install "pillow", the Python Imaging Library, and all you
need is this:
from PIL import Image
Image.open('myfile.tif').save('myfile.jpg')
--
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
[pièce jointe "smime.p7s" supprimée par Sylvain Fejoz/bge/ville-ge]
_______________________________________________
python-win32 mailing list
python-win32 at python.org
https://mail.python.org/mailman/listinfo/python-win32
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20190726/35874308/attachment-0001.html>
More information about the python-win32
mailing list