profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/radarhere/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

matthew-brett/multibuild 200

Machinery for building and testing Python Wheels for Linux, OSX and (less flexibly) Windows.

radarhere/Pillow 1

The friendly PIL fork

radarhere/podcastactivity 1

Podcast Activity Logger

radarhere/acf 0

Advanced Custom Fields

radarhere/Apollo-11 0

Original Apollo 11 guidance computer (AGC) source code.

radarhere/core 0

🍺 The missing package manager for macOS (or Linux)

radarhere/delocate 0

Find and copy needed dynamic libraries into python wheels

radarhere/docker-images 0

Docker images for ci testing

radarhere/homebrew-core 0

🍻 Default formulae for the missing package manager for macOS

issue commentpython-pillow/Pillow

Inconsistent Image.fromarray() behaviour with mode '1'

For fromarray?

https://github.com/python-pillow/Pillow/blob/d76fd93a77eee4ea80b911928a09780d764c506e/src/PIL/Image.py#L2877-L2902

dtoniolo

comment created time in 7 hours

delete branch radarhere/Pillow

delete branch : libimagequant

delete time in 11 hours

push eventradarhere/Pillow

Andrew Murray

commit sha 836e6d98a3ce7cded8942d485ecf35010d996694

Updated libimagequant to 2.16.0

view details

Hugo van Kemenade

commit sha d76fd93a77eee4ea80b911928a09780d764c506e

Merge pull request #5726 from radarhere/libimagequant Updated libimagequant to 2.16.0

view details

push time in 11 hours

CommitCommentEvent

pull request commentntninja/Pillow

Ensure filename is a string

Sorry, didn't mean to cause confusion. Nothing more needs to be done here. I just meant that I didn't merge this because I thought I knew better - I merged it because I wasn't getting a response. It's your Pillow PR, you can ultimately do what you want.

radarhere

comment created time in 18 hours

PR opened python-pillow/Pillow

Updated libimagequant to 2.16.0 Dependency
+2 -2

0 comment

2 changed files

pr created time in 19 hours

issue commentpython-pillow/Pillow

Inconsistent Image.fromarray() behaviour with mode '1'

The raw mode is the mode of the incoming data. Pillow converts (unpacks) the data from the rawmode to the mode as a way of normalising it, reducing the number of modes that we have to support operations for.

Here is the unpack method from 1;8 to 1 - https://github.com/python-pillow/Pillow/blob/ffde039f26a5587dacf0d9fb86cbfe9e5e8bb7ba/src/libImaging/Unpack.c#L246-L255

As opposed to our method for just unpacking 1 to 1 - https://github.com/python-pillow/Pillow/blob/ffde039f26a5587dacf0d9fb86cbfe9e5e8bb7ba/src/libImaging/Unpack.c#L110-L142

dtoniolo

comment created time in 19 hours

issue commentpython-pillow/Pillow

Symantec Antivirus Quarantines Pillow Source for Bloodhound.Exploit.14

Hi. Are you interested in submitting the file as 'Incorrectly Detected by Symantec' at https://symsubmit.symantec.com/ ? I started, but then realised I don't know exactly what product/version you were using.

djpeaco

comment created time in 19 hours

create barnchradarhere/Pillow

branch : libimagequant

created branch time in 19 hours

push eventpython-pillow/pillow-depends

Andrew Murray

commit sha 64d033ff9e021b6872597f97bc5e35b78dd308ef

Added libimagequant 2.16.0

view details

push time in 19 hours

push eventradarhere/pillow-depends

Andrew Murray

commit sha 64d033ff9e021b6872597f97bc5e35b78dd308ef

Added libimagequant 2.16.0

view details

push time in 19 hours

push eventradarhere/Pillow

Andrew Murray

commit sha c1db69cc3f245d0565c4a39556ab4574d2c61dd5

Renamed register_open accept method for consistency

view details

Andrew Murray

commit sha 312ed69c0196e2fbeaa9a7856e9e34e41c1e4b0c

Commented unused method

view details

pre-commit-ci[bot]

commit sha 99428bb878ac1cd8a61a5089ca43741d918c4ffb

[pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci

view details

Hugo van Kemenade

commit sha ffde039f26a5587dacf0d9fb86cbfe9e5e8bb7ba

Merge pull request #5724 from radarhere/accept

view details

push time in 19 hours

delete branch radarhere/Pillow

delete branch : accept

delete time in 19 hours

PR opened python-pillow/Pillow

Accept methods cleanup

Two changes.

  • #5380 changed plugins to more consistently call a method called _accept as the last argument to Image.register_open. This PR also does that for our example plugin.
  • MpoImagePlugin has its Image.register_open call commented out. https://github.com/python-pillow/Pillow/blob/0a47b7306b0a602a7b362b0b1b6a9cc59edf42de/src/PIL/MpoImagePlugin.py#L130-L131 So this PR comments out the unused _accept method from MpoImagePlugin.
+4 -4

0 comment

2 changed files

pr created time in a day

create barnchradarhere/Pillow

branch : accept

created branch time in a day

issue commentpython-pillow/Pillow

Inconsistent Image.fromarray() behaviour with mode '1'

https://github.com/python-pillow/Pillow/issues/5465#issuecomment-831833783

Mode for fromarray is the "Mode to use". I think this is the mode to use when reading the numpy data - if so, then it makes sense that the values change when it is told to interpret the input data directly.

By default, the boolean data is inferred to have a mode of 1 and a rawmode of 1;8. Because you are explicitly setting it, they both become 1, and so the output data is different.

https://github.com/python-pillow/Pillow/issues/5465#issuecomment-831871276

I think that the mode to use parameter is a footgun. It’s not an implicit conversion, it’s a cast.

dtoniolo

comment created time in a day

issue commentpython-pillow/Pillow

Inconsistent Image.fromarray() behaviour with mode '1'

Hi. This seems to be a duplicate of #5465. Try having a read through the comments there.

dtoniolo

comment created time in a day

issue closedpython-pillow/Pillow

How to load my own TifImagePlugin.py

Hi community, i would like to process .tif images. I use for this my own TifImagePlugin which is intended to define and read certain information from these images such as: Exposure Time, Local Time, etc ....

When I type:

from PIL import Image, ImageFile
import TifImagePlugin
d=Image.open('/home/mk-laptop/054/6300_0010.tif')
print(d.info.keys())

it returns only: dict_keys(['compression', 'resolution']) and several keys which the script must provide are missing which means that my script does not load the TifImagePlugin module.

On Ipython3 prompt:

 from PIL import Image                                                                         
 import TifImagePlugin                                                                         
 with Image.open('/home/mk-laptop/Desktop/054/6300_0031.tif') as d: 
   ...:     print(d) 
   ...:     print(d.format) 
   ...:     print(d.format_description) 
   ...:                                                                                               
<PIL.TiffImagePlugin.TiffImageFile image mode=I;16 size=728x490 at 0x7FC54C0326A0>
TIFF
Adobe TIFF

So it loads the TiffImagePlugin and not TifImagePlugin.

I tried to place TifImagePlugin.py on the location which contains the other ImagePlugins from PIL (like TiffImagePlugin and others)

Please I will be very grateful if you could help me to resolve this problem

closed time in 2 days

mkmohamed

issue commentpython-pillow/Pillow

How to load my own TifImagePlugin.py

Testing with that file, I find that if I modify your code by replacing

if FileIdentifier != "CDF":

with

if FileIdentifier != b"CDF":

and similarly replace all three instances of '\x00' with b'\x00', then your plugin runs without an error.

mkmohamed

comment created time in 2 days

issue commentpython-pillow/Pillow

How to load my own TifImagePlugin.py

You can compress the image into a zip or tgz, and then attach that file.

mkmohamed

comment created time in 2 days

push eventradarhere/Pillow

Ondrej Baranovič

commit sha 8fd843bf16f8534626f75708115077baaf4d5de0

Delete raqm.cmake

view details

Ondrej Baranovič

commit sha 2205f6050e4183b1ecc3f05e7f30efd827ca7853

document --no-fribidi option

view details

Hugo van Kemenade

commit sha 0a47b7306b0a602a7b362b0b1b6a9cc59edf42de

Merge pull request #5722 from nulano/remove-raqm-cmake Remove raqm.cmake

view details

push time in 2 days

issue commentpython-pillow/Pillow

How to load my own TifImagePlugin.py

You've misread my code slightly. fp is not the image, it is the file contents.

Instead of

with Image.open("/home/mk-laptop/Desktop/054/6300_0024.tif") as fp: 
    TifImagePlugin.TifImageFile(fp, "/home/mk-laptop/Desktop/054/6300_0024.tif") 

do this

with open("/home/mk-laptop/Desktop/054/6300_0024.tif", "rb") as fp: 
    TifImagePlugin.TifImageFile(fp, "/home/mk-laptop/Desktop/054/6300_0024.tif") 

Alternatively, you could try posting 6300_0024.tif here.

mkmohamed

comment created time in 3 days

issue commentpython-pillow/Pillow

How to load my own TifImagePlugin.py

Is it possible that your plugin is throwing an error when it tries to load the file?

For example, when I run the following code,

from PIL import Image
import TifImagePlugin
with Image.open("Tests/images/no_rows_per_strip.tif") as im:
	print(im)

I get

<PIL.TiffImagePlugin.TiffImageFile image mode=P size=950x975 at 0x105262340>

That's not because your plugin isn't running, it's because your plugin is throwing an error, and Pillow is moving on to try other formats.

To see this, I call your plugin directly

from PIL import Image
import TifImagePlugin
with open("Tests/images/no_rows_per_strip.tif", "rb") as fp:
	TifImagePlugin.TifImageFile(fp, "Tests/images/no_rows_per_strip.tif")

and get

Traceback (most recent call last):
  File "script.py", line 4, in <module>
    TifImagePlugin.TifImageFile(fp, "Tests/images/no_rows_per_strip.tif")
  File "PIL/ImageFile.py", line 121, in __init__
  File "TifImagePlugin.py", line 22, in _open
    raise SyntaxError("not a CDF TIF file")
SyntaxError: not a CDF TIF file
mkmohamed

comment created time in 3 days

issue commentpython-pillow/Pillow

How to load my own TifImagePlugin.py

You shouldn't need to place your plugin in the plugin directory.

Your image plugin calls register_open?

Image.register_open(TifImageFile.format, TifImageFile, _accept)

In general, you've seen https://pillow.readthedocs.io/en/stable/handbook/writing-your-own-file-decoder.html ?

mkmohamed

comment created time in 3 days

push eventradarhere/Pillow

Andrew Murray

commit sha 58fcc6edeee367f956397ad2372414f916527d22

Updated harfbuzz to 3.0.0

view details

Hugo van Kemenade

commit sha 2496b0d29b5427bddda0e415ac88927989fb6f08

Merge pull request #5720 from radarhere/harfbuzz Updated harfbuzz to 3.0.0

view details

push time in 3 days

push eventradarhere/pillow-wheels

Andrew Murray

commit sha 3c8056a6cb2ce96c4a14d6e0f40c1dc728b6dfab

Updated harfbuzz to 3.0.0

view details

Hugo van Kemenade

commit sha daf59dfd9d19fb0f0f9328194eb938d4b7987c36

Merge pull request #223 from radarhere/harfbuzz Updated harfbuzz to 3.0.0

view details

push time in 3 days

delete branch radarhere/pillow-wheels

delete branch : harfbuzz

delete time in 3 days

delete branch radarhere/Pillow

delete branch : harfbuzz

delete time in 3 days