Questions tagged [pgmagick]

pgmagick is a GraphicsMagick(Magick++) binding for Python.

From its documentation:

pgmagick is a GraphicsMagick(Magick++) binding for Python.

Links

17 questions
11
votes
4 answers

pgmagick install on linux

Im trying to install pgmagick on CentOS. After i run pip install pgmagicki get some errors. After i checked log file, this is what i've got: Running setup.py egg_info for package pgmagick Traceback (most recent call last): File…
miszczu
  • 1,179
  • 4
  • 19
  • 39
6
votes
2 answers

Generate Smooth White Border Around Circular Image

I'm using pgmagick to generate a circular thumbnail. I'm using a process similar to the one discussed here, which does indeed produce a nice circular thumbnail for me. However, I need a white border around the radius of the circle. My initial…
user1427661
  • 11,158
  • 28
  • 90
  • 132
4
votes
2 answers

Flood fill with Graphicsmagick or pgmagick

Question What is a good way to use flood fill with the Graphicsmagick command line or its pgmagick wrapper for python? Background So far this is what I have, but its saying that the signatures do not match: Code: from pgmagick import Image,…
Chris Dutrow
  • 48,402
  • 65
  • 188
  • 258
2
votes
0 answers

Low level pixel access via pgmagick

I was wondering if it possible to perform low level pixel manipulations on an image via pgmagick. In particular, I would like to mimic the functionality found in the C++ GraphicsMagick API shown…
indraniel
  • 577
  • 1
  • 4
  • 8
1
vote
0 answers

pgmagick on Mac OS

I try to install pgmagick on my MacOS Mojave (10.14.6). On the https://pypi.org/project/pgmagick/ there is a guide for installing on MacOS: 1) When I try the first method ($brew install pgmagick --with-python3) I'm getting an error: 'Error: invalid…
Alina
  • 11
  • 1
1
vote
1 answer

Opening an Image From a URL with pgmagick

In pgmagick, you initialize an image like this: Image('my_image.png') I will be operating on files stored remotely on S3 and would rather not temporarily store them on disk. Is there any way to open an image file from a URL instead? When I try to…
user1427661
  • 11,158
  • 28
  • 90
  • 132
1
vote
1 answer

How can I show a graphicsmagick Image in a wxpython gui?

I would like to use graphicsmagick with wxpython to make an interactive image editor. I'm using the pgmagick python api. A naive attempt: from wxPython import wx from pgmagick import Image im = Image('portrait.png') wximg =…
1
vote
3 answers

How to build pgmagick on linux (CentOS)?

I'm not having much success when attempting building pgmagick on CentOS 5.6. I've installed the following via…
Phillip B Oldham
  • 18,807
  • 20
  • 94
  • 134
0
votes
0 answers

libboost_python-dev for Python 3.8 on Ubuntu 22.04

I have a production server with Ubuntu 20.04 and Python v3.8.10. My development environment is Ubuntu 22.04 with Python v3.10.6. Both environments make use of a virtual environment when running python code. Thus far the differences between Python…
0
votes
0 answers

How do I open a file in pgmagick (Imagemagick python wrapper), from a URL?

I was wondering how do I open a file using pgmagick (ImageMagick's Python Wrapper), from a URL? So far I have tried i) using BytesIO: from pgmagick import Image from io import BytesIO filepath = 'http://example.com/a.jpeg' response =…
0
votes
0 answers

pgmagick image object to blob

Is there a way I can convert the Image() object to blob? If I want to serve an image which is created by pgmagick to a HTTP request without writing it on the disk, I see converting the image object to blob and then streaming back to the request is…
vikas kv
  • 386
  • 2
  • 15
0
votes
0 answers

Adjusting image levels in Python with pgmagick

I'm trying to adjust image levels with pgmagick on Windows 7, Python 3.5.1. All the variations I've come up with either end up with an almost completely white image or the error below: Traceback (most recent call last): File "test.py", line 7, in…
t4--
  • 1
  • 1
0
votes
1 answer

How do I get text bounding box drawn with pgmagick

I successfully draw some text on an image by pgmagick: from pgmagick.api import Image img = Image((300, 200)) img.annotate('Hello World') img.write('helloworld.png') but how to get the bounding box of text? Anyone can help me?
0
votes
1 answer

pgmagick: Convert an image to PNG foramt

I am trying to convert a jpeg image to a png(rgb+α). I tried the following code, but it doesn't work. img.write('path/to/file/png32:filename.png') How do I achieve this?
d-_-b
  • 4,142
  • 6
  • 28
  • 43
0
votes
0 answers

pgmagick on Google AppEngine

I am trying to use pgmagick on Google AppEngine. I have dropped pgmagick 0.5.10 directory (containing init.py, _version.py, api.py) in main AppEngine directory. I can deploy the app successfully on Google AppEngine but it fails on the import…
derezzed
  • 1
  • 1
1
2