Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
image conversion
#1
i'm thinking about the design of a (my first) GUI program. this program will need to read image files and display some or all of an image in some or all of the space in the window it is working in (or whole screen if that is chosen by the user). what i am wonder about right now is how to read in various image file formats. i would guess there would be an API to open the image file and read blocks of pixels in some order (probably the order they are stored in the file). is there a package for Python3 that can uncompress and read GIF, JPEG, and PNG formats? more formats is a plus but those three are absolutely needed. it is a big plus if the image reading API is the same (relative to the open image object) for all formats. e.g. i want to avoid separate packages and different APIs for different image formats (but if i have to, it's not a show stopper). an API that can open many files concurrently is a big plus (i might have to store many small image, otherwise). an API that can open output files for image writing, with image compression for the specified format, is a plus. an API that supports video is also a minor plus. support for opening an I/O object in place of a file is a big plus (most packages i have seen, of late, can do this, and specifying the image file format might be required for reading).
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#2
Many people use pillow for image processing. I think it's worth a try.
Reply
#3
looks good to me. thanks!
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#4
is there a help site/forum for pillow? i've run into ambiguities in the documentation, already.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#5
(Sep-19-2023, 12:09 AM)Skaperen Wrote: is there a help site/forum for pillow? i've run into ambiguities in the documentation, already.

The documentation is really the best place to look for. What are the issues you are finding?
Reply
#6
this seems to be a case where documentation of one part depends on knowing the other parts, or at least remembering an incomplete part until you get to the other parts that will complete the concepts. many tutorials with references tend to be organized like this. it seems they refer to image "channels" as "bands". i don't yet know exactly what i'd get if i want to get a region of an image. "deep pixels"? 3x "bytes"?

i'm continuing through this as time permits. as i build up a bigger picture in my mind these parts may make more sense. i'm hoping to soon reach a point where i can make a simple (not necessarily useful) application sample processing an image. i did make one that tells me the size of image files, given their names. at least it loads cleanly so there are probably no install issues. actually version 7 was already there but now i have version 10 (i don't remember the exact version, Python is 3.8.10, Ubuntu is 20.04.6 LTS).
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#7
see Using The image class
Reply
#8
i think i am at a point i can write a script or two. i should just go ahead and try it out as i read more. the reference part of the docs should be readable for me, now.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Forum Jump:

User Panel Messages

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