[PHP] TIFF Images

2004-07-29 Thread Stephen Craton
I'm working on a thumbnail script currently that needs to support multiple
types of files, such as jpeg, bmp, gif, etc. One of the file types I need to
support is a TIFF type image. I was looking through the PHP manual from
imagecreatfrom... functions and I couldn't find one for tiff. Is there any
support for TIFF files in PHP or maybe a way to convert a TIFF file for
temporary usage to make a thumbnail?

Thanks,
Stephen Craton
http://www.melchior.us
http://php.melchior.us
http://www.chatness.us

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] TIFF Images

2004-07-29 Thread Justin Patrin
On Thu, 29 Jul 2004 17:16:58 -0500, Stephen Craton
[EMAIL PROTECTED] wrote:
 I'm working on a thumbnail script currently that needs to support multiple
 types of files, such as jpeg, bmp, gif, etc. One of the file types I need to
 support is a TIFF type image. I was looking through the PHP manual from
 imagecreatfrom... functions and I couldn't find one for tiff. Is there any
 support for TIFF files in PHP or maybe a way to convert a TIFF file for
 temporary usage to make a thumbnail?
 

GD doesn't support TIFFs (and neither do browsers). Try looking into
ImageMagick.

-- 
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] TIFF images

2004-06-25 Thread Dan Joseph
Hi Everyone,

Last week I posted about having a problem displaying TIFFs thru PHP.
This week I'm back to issues, tho slightly different.  I'll start over with
my case.

I have a docroot:

/usr/local/apache/htdocs-chm/

I have an images dir:

/usr/local/apache/chm-images/

These are sensitive documents that I cannot have out where the public can
get to them.

I was using ImageMagick, however it took a multipage tiff and turned it
into:

1.TIFF

1.JPG.0
1.JPG.1
1.JPG.2
1.JPG.3

Sometimes they are 1.JPG, sometimes only 2 pages, sometimes 10 pages.  We've
decided to go with a TIFF viewer plug-in, and just use those.  I am using
the follow PHP script to handle this:

?
session_cache_limiter('private');

include( $_SERVER['DOCUMENT_ROOT'] . /master.include.php );

$blah = /usr/local/apache/chm-images/ . $_GET['id'] . .TIFF;

header(Content-type: image/tiff);
header(Content-Transfer-Encoding: binary);

$_GET['id'] = str_replace( ., , $_GET['id'] );
$_GET['id'] = str_replace( /, , $_GET['id'] );

readfile( $blah );
?

If the TIFF is a single pager, it works fine.  If it's a multipager, I get
an invalid file format error.  I'm really at a loss as what to do.  I'm
willing to explore other solutions to display the TIFF images also.

Can anyone please help?

-Dan Joseph

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] TIFF images

2004-06-25 Thread Curt Zirzow
* Thus wrote Dan Joseph:
 ...
 
 I was using ImageMagick, however it took a multipage tiff and turned it
 into:
 
 1.TIFF
 
 1.JPG.0
 1.JPG.1
 1.JPG.2
 1.JPG.3
 
 Sometimes they are 1.JPG, sometimes only 2 pages, sometimes 10 pages.  We've
 decided to go with a TIFF viewer plug-in, and just use those.  I am using
 the follow PHP script to handle this:
 
 ?
 code ok...
 ?
 
 If the TIFF is a single pager, it works fine.  If it's a multipager, I get
 an invalid file format error.  I'm really at a loss as what to do.  I'm
 willing to explore other solutions to display the TIFF images also.
 
 Can anyone please help?

I'm not familiar with TIFF (nor ie plugin) and these paging things
in .jpg, but the first question that comes to mind is, what exactly
is telling you that its an invalid format?


Curt
-- 
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about.  No, sir.  Our model is the trapezoid!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php