Hi,
any suggestions on how to get width and height of an image from an image file? And further, how to get the color value at any point of the image?
5 9384
Hi,
any suggestions on how to get width and height of an image from an image file? And further, how to get the color value at any point of the image?
That will depend entirely on the type of image and the tools that you are using.
PIL & Tkinter? wxPython? Other? Working with gif, tiff, png, jpeg, etc????
Hey,
I'm using .png image files. I'm working with FrogLogic configured to use Python language.I've already learned that I can use PIL for that, for example:
from PIL import image
im=Image.image("image.png")
pring im.size
and it will return tuple of the format (width, height). I'm wondering if I can somehow get those values in separate statements so I can store them for future use in my script!?
Hey,
I'm using .png image files. I'm working with FrogLogic configured to use Python language.I've already learned that I can use PIL for that, for example:
from PIL import image
im=Image.image("image.png")
pring im.size
and it will return tuple of the format (width, height). I'm wondering if I can somehow get those values in separate statements so I can store them for future use in my script!?
will "unpack" the tuple. This method is used often, but the tuple size must match the variable assignments or it will throw an exception.
will "unpack" the tuple. This method is used often, but the tuple size must match the variable assignments or it will throw an exception.
Thank you, Mr. Barton)))
it really helped me!
Thank you, Mr. Barton)))
it really helped me!
You are quite welcome. That's what we are here for.
Keep posting,
Barton
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Ana |
last post by:
I just ran a report on a site I'm redesigning and came up with all these
missing height/width tags. How important are they? Should I go through the
trouble of making sure they're there?
Ana
|
by: Pums |
last post by:
How to get the information(like height, width) of an
image to be uploaded?
|
by: Adam |
last post by:
Can someone please help!!
I am trying to figure out what a font is?
Assume I am working with a fixed font say Courier 10 point font
Question 1: What does this mean 10 point font
Question 2:...
|
by: Blake Versiga |
last post by:
After pulling an image from the data base and the Image.Height and
Image.Width are not set to the ImageURL's attributes.
1) Is there a way to have these properties updated? or
2) How do I get...
|
by: Mustafa Rabie |
last post by:
dear all,
i am writing an application where the user can upload his own picture. I
wanted to get the Width and Height of the uploaded picture. So i assigned
the uploaded image to an aspnet...
|
by: comp.lang.php |
last post by:
Sorry folks, I'm on a roll!!!
I need to calculate the height or width of an image if you change
either the width or height and don't change BOTH of them at the same
time, this is to "vector" the...
|
by: pecan |
last post by:
I have hundreds of pictures on my site. The thumbnails are all a standard
size, and most of the bigger ones are the same size too. When I run my html
code through my optimizer it throws out a...
|
by: Kentor |
last post by:
Hello,
I have users that submit images to my website. By default I choose to
make the width bigger than the height because usually pictures are
taken horizontally... But in some cases people take...
|
by: bizt |
last post by:
Hi,
Is it possible to obtain the width/ height of an image when that image
is dyanically created using a PHP script and passing GET attributes.
For example:
<img...
|
by: vishwa Ram |
last post by:
Hi all,
How to get tiff image height and width using Image object in VB.
Thanks,
vishwa Ram.
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
| |