Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

ImageTransform messing up pictures
I am trying to use ImageTransform to create thumbnails for a gallery
that I am building.  I am using the GD driver (PHP has gd installed with
it).  But when I resize the image, the resulting image's color is
destroyed.  It seems to turn it into black and white.  I have followed
the examples that was included with the GD driver, but can't seem to
figure out what I am doing wrong.  Here is my code.  ($art is a
dataobject that stores the filename in a mysql table).  Is there a
setting that I need to set?  Or should I use a different driver? (this
occurs on my test and production server).  The filetypes are jpg.

$thumbnail = Image_Transform::factory('GD');
$thumbnail->load(BASEDIR.$art->picture);
$thumbnail->keepSettingsOnSave(true);
$thumbnail->scaleMaxlength('150');
$path = pathinfo($art->picture);
$thumbnail_file = '/images/gallery/thumbnails/'.$path['basename'];
$thumbnail->save(BASEDIR.$thumbnail_file,'',200);
$art->thumbnail = $thumbnail_file;


Trevan

Report this thread to moderator Post Follow-up to this message
Old Post
Trevan
11-29-04 09:04 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Pear archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:18 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.