473,387 Members | 3,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

TIFF Image conversion

Hi,

I need to convert a 24-bit RGB TIFF image to an 8-bit RGB TIFF image.
I've tried using PIL and the convert() method - this allowed me to
convert to an 8-bit grayscale image, close but not exactly what I need
:(

From what I've read, it doesn't look like I can do what I need in PIL.
Does anyone know of another method ?

Thanks,

Alastair.
Jul 18 '05 #1
3 3010
I think you could use netpbm to do the conversion.

http://netpbm.sourceforge.net/

I use it for a lot of my TIFF-work that PIL just
doesn't yet support. Wrap a function/class around
an os.system() call to execute it if you want to
call from Python.

HTH,
Larry Bates
Syscon, Inc.

"alastair" <al**********@yahoo.co.uk> wrote in message
news:23**************************@posting.google.c om...
Hi,

I need to convert a 24-bit RGB TIFF image to an 8-bit RGB TIFF image.
I've tried using PIL and the convert() method - this allowed me to
convert to an 8-bit grayscale image, close but not exactly what I need
:(

From what I've read, it doesn't look like I can do what I need in PIL.
Does anyone know of another method ?

Thanks,

Alastair.

Jul 18 '05 #2
On 12 Jul 2004 07:57:40 -0700, al**********@yahoo.co.uk (alastair)
declaimed the following in comp.lang.python:
Hi,

I need to convert a 24-bit RGB TIFF image to an 8-bit RGB TIFF image.
Pardon? The only color 8-bit formats I'm familiar with are those
using indexed color (primarily GIF, though PNG may also have that mode).
You are limited to only 256 discrete colors.

-- ================================================== ============ <
wl*****@ix.netcom.com | Wulfraed Dennis Lee Bieber KD6MOG <
wu******@dm.net | Bestiaria Support Staff <
================================================== ============ <
Home Page: <http://www.dm.net/~wulfraed/> <
Overflow Page: <http://wlfraed.home.netcom.com/> <

Jul 18 '05 #3
alastair wrote:
Hi,

I need to convert a 24-bit RGB TIFF image to an 8-bit RGB TIFF image.
I've tried using PIL and the convert() method - this allowed me to
convert to an 8-bit grayscale image, close but not exactly what I need
:(


With the caveat expressed above (that there may well not *be* such a
thing as an 8-bit RGB TIFF), you may want to look into using ImageMagick
(and the Python API for it) for your image manipulation. See
www.imagemagick.org for more information.

Jeff Shannon
Technician/Programmer
Credit International
Jul 18 '05 #4

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

Similar topics

0
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...
1
by: Maurice Mertens | last post by:
Hello, I'm having troubles with saving a tiff-file with a certain compression and colordepth. This is the code I use: ----------------------------------------------------------------------...
2
by: wayne | last post by:
Hi, May I know how to use VC++ to write a program that can read a TIFF image file? thanks alot --
3
by: T. Davis | last post by:
In C#, I am able to successfully stream a TIFF image that comes from a BLOB field in a database, save it to file, then convert the pages within TIFF file into jpegs (using GDI+) and display on the...
2
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...
10
by: rtilley | last post by:
Hope it's not inappropriate to post this here. Could someone critique my code? I have no Python programmers in my office to show this to. The script works OK, but should I do it differently? I...
7
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....
5
by: massimoal | last post by:
Hi all, I need to convert a tif image, grabbed by a pixelink industrial camera, to a text file (1024x768 elements) but I really don't know how. Surfing the net I found that there are a lot of...
2
by: mndprasad | last post by:
hi all i am doing a project in java where i need to convert 10 jpeg images into a single tiff image..conversion of single jpeg image to single tiff is happening but embedding all the 10 jpeg images...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
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
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.