473,671 Members | 2,370 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Tiff Image Reader/writer

Hi I am looking for a simple tiff Image reader/writer in python.Can
anyone point me to the right one.

Jul 19 '05 #1
17 10021
On 13 Jun 2005 07:55:04 -0700,
"PyPK" <su*******@gmai l.com> wrote:
Hi I am looking for a simple tiff Image reader/writer in python.Can
anyone point me to the right one.


I don't know what your definition of "simple" is, but check out the
Python Imaging Library (PIL) at effbot.org.

Regards,
Dan

--
Dan Sommers
<http://www.tombstoneze ro.net/dan/>
Jul 19 '05 #2
Is there any package out there which handles Tiff Images other than PIL
or ImageMagic .

Jul 19 '05 #3
What sort of things do you want to do with the TIFFs? How
heavy-weight or light-weight are you interested in? For heavy-weight
there are:

- wxPython will do a bunch of tiff reading, and some image processing
http://www.wxpython.org

- GDAL
(quoting Khalid Zuberi:)
GDAL supports GeoTIFF and includes python bindings:

http://www.remotesensing.org/gdal/
- ITK Insight Toolkit from Kitware (wicked heavy-weight)
http://www.itk.org

-Jim

On 13 Jun 2005 12:50:48 -0700, PyPK <su*******@gmai l.com> wrote: Is there any package out there which handles Tiff Images other than PIL
or ImageMagic .

--
http://mail.python.org/mailman/listinfo/python-list

Jul 19 '05 #4
nothing fancy. I just want to be able to read a tiff image, get pixel
values, write back to a tiff file.

Jul 19 '05 #5
PyPK wrote:
nothing fancy. I just want to be able to read a tiff image, get pixel
values, write back to a tiff file.


[An aside: please quote the message you are replying to.]

Why doesn't the PIL satisfy this need? Or are you just collecting a list
of packages with this capability?

--
Robert Kern
rk***@ucsd.edu

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter

Jul 19 '05 #6
One reason why I don't want to use PIL is it seems very slow for tiff
images of very large sizes(2400x4800 ). So I am looking for a better
tool than does the right job faster.

Jul 19 '05 #7
PyPK wrote:
One reason why I don't want to use PIL is it seems very slow for tiff
images of very large sizes(2400x4800 ). So I am looking for a better
tool than does the right job faster.


This isn't fast enough?

In [8]: %time img2 = Image.open('foo .tiff')
CPU times: user 0.00 s, sys: 0.01 s, total: 0.01 s
Wall time: 0.03

In [9]: img2.size
Out[9]: (2400, 4800)

--
Robert Kern
rk***@ucsd.edu

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter

Jul 19 '05 #8
When i try this i get this error:

import Image
im = Image.open('ima ge.tif')
im.getpixel((10 ,19))

Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "Image.py", line 858, in getpixel
self.load()
File "/usr/local/lib/python2.4/site-packages/PIL/ImageFile.py", line
180, in load
d = Image._getdecod er(self.mode, d, a, self.decodercon fig)
File "Image.py", line 328, in _getdecoder
raise IOError("decode r %s not available" % decoder_name)
IOError: decoder group4 not available

Jul 19 '05 #9
"PyPK" wrote:
nothing fancy. I just want to be able to read a tiff image, get pixel
values, write back to a tiff file.


so why doesn't PIL or ImageMagick work for you?

here's a minimal PIL version:

from PIL import Image

im = Image.open("myf ile.tiff")
value = im.getpixel((12 , 34))
im.save("other. tiff")

</F>

Jul 19 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
17940
by: Nicolas Guilhot | last post by:
Hi all ! I have a multi-page Tiff image file that I want to convert to PDF. To do so I am using iText library. The conversion is working, but the code execution is very different according to wich iTextSharp.text.Image.getInstance(...) signature I am using : - using code 1 below, the conversion is fast enough but the resulting PDF file is too big (1 817ko sample Tiff file is converted in less than 30 seconds to a 2 764ko PDF file) -...
0
1498
by: E-Cube | last post by:
Hello all, I am attempting to save a bitmap image and saving it as a tiff image with CCITT4 compression using the folllowing code. oEncoderParameters = New Imaging.EncoderParameters(1) oEncoder = Imaging.Encoder.Compression oParameter = New Imaging.EncoderParameter(oEncoder, Imaging.EncoderValue.CompressionCCITT4) oEncoderParameters.Param(0) = oParameter
2
2041
by: S.Creek | last post by:
Hi, I need to take few files (images in my case) and create one file out of them, this file should be accessed so i can grab a single image from it if necessary, i thought of taking all the images and put them in one binary file, but couldn't figure out a way to do that, anyone has an idea? thanks
2
3575
by: Al Reid | last post by:
Is it possible to display an image that is stored on the server as a TIFF image, on an ASP.Net page without the use of an add-in viewer? If so, could someone tell me how to do it? TIA -- Al Reid
5
5981
by: Shane Story | last post by:
I can seem to get the dimensions of a frame in a multiframe tiff. After selecting activeframe, the Width/Height is still really much larger than the page's actual dimensions. When I split a TIFF to several PNG files this causes a problem, becuase the resulting image is (the page to the far left and a lot of black space surrounding it and a filesize that is larger than needed. Any ideas?
6
10026
by: qysbc | last post by:
I have a web page and there is a link to open a TIFF file. The way I do it is to have the server code open a binary stream, set the content type to "image/tiff" and call Response.BinaryWrite. On the client machine, the file type TIFF is associated with Kodak Imaging Preview. This app works on most client machines. When you click on the link, Kodak Imaging Preview will open the TIFF file on the client machine. However, on some machines, the...
1
3450
by: Stedak | last post by:
I have the following class I use to save Tiff's. The problem I have with it is that the final size of the images are very large. If we scan directly to a file the final tiff may be 600-900 kb.s but with this code it is often 4000-5000 kb.s. What am I missing? public class EmrTiff : IDisposable { private string fileName; private ArrayList imageContainer = null;
7
3782
by: Ben | last post by:
Hi We are looking for a component that offers that offers the below for Tiff files: Image clean-up (deskew, despeckle) Printing capabilities from VB The ability to add text to image, e.g. time / date Nice to have:
10
10710
by: =?Utf-8?B?UmludSBHb3BhbGFrcmlzaG5hIFBpbGxhaQ==?= | last post by:
Hi, Please help me to write a dll in C# , that will read each pages of a tiff image from a file and a memory stream object ( need two ways) and creatre a new tiff image object.The dll should return the combined tif image object. Thnks in advance Rinu G P
0
8472
marktang
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8819
jinu1996
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8596
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8667
tracyyun
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6222
isladogs
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4221
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4399
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2048
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1801
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.