Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
.png data as matrix ?
#2
I'd probably use pillow. Can install with pip.

>>> from PIL import Image
>>> qr = Image.open("qr.png", "r")
>>> qr.size
(171, 171)
>>> 171 * 171
29241
>>> len(list(qr.getdata()))
29241
Reply


Messages In This Thread
.png data as matrix ? - by Hambonius - May-01-2020, 02:25 PM
RE: .png data as matrix ? - by bowlofred - May-01-2020, 08:36 PM
RE: .png data as matrix ? - by Hambonius - May-02-2020, 05:17 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Check if two matrix are equal and of not add the matrix to the list quest 3 823 Jul-10-2023, 02:41 AM
Last Post: deanhystad
  Build a matrix by pressing buttons of an interface in Tkinter which extract data from juandiegopulla 1 1,949 Sep-13-2021, 07:28 PM
Last Post: deanhystad
  How to multiply a matrix with herself, until the zero matrix results peanutbutterandjelly 3 3,361 May-03-2021, 06:30 AM
Last Post: Gribouillis
  matrix from matrix python numpy array shei7141 1 3,696 Jan-16-2017, 06:10 PM
Last Post: micseydel

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020