Images corrupt when being converted and saved. Any solutions?

Author Message

Stuart Fenton

Tuesday 01 July 2003 5:07:21 am

I have a strange image problem.

When I upload an image using an ez web form the image corrupts and I only get the top few lines of the image followed by some random squares then the rest of the image is black.

Image magic is installed and I can test it by typing "convert file.jpg file.png" in the command shell. It happily converts the file from jpeg to png without any errors. I can convert to gif, png, jpeg, tiff all without any problems so it's not a corrupted installation. I can also resize it without any problems.

But just to be on the safe side I reinstalled all of the image libraries along with image magic and GD.

Here is my settings from the image.ini file:
============================================
[ConverterSettings]
# Whether to use the external program 'convert' for converting or not
# convert can handle most image formats in existence but may not be available
UseConvert=true
# Whether to use GD for converting or not
# GD can handle JPEG and PNG's (GIF is generally not available due to patent issues)
# this means that if you disable GD you won't get support for lots of image formats
UseGD=false

[GDSettings]
# If set to true more advanced functionality will be available
# which is present in GD2. This requires GD2 to be compiled in
# the PHP module.
HasGD2=false

[ShellSettings]
# Windows installations should specify the path since convert is also
# an application for converting filesystems.
ConvertPath=/usr/bin
ConvertExecutable=/usr/bin/convert

========================================
Here is the debug output:

Warning: eZModuleOperationInfo::execute Jul 01 2003 12:32:31

Missing main operation memento for key: c74488fab4aa646df5751f2afcd08a3c
Debug: here 1 Jul 01 2003 12:32:31

array(1) {
[0]=>
string(70) "ezcontentobject.contentclass_id in (1,10,10,11,11,2,2,5,5,7,7,8,8,9,9)"
}

Warning: Jul 01 2003 12:32:31

Exec: /usr/bin/convert -geometry "600x600>" var/storage/reference/image//phplgvUsN.jpg jpg:var/storage/variations/image/p/h/p//phplgvUsN_600x600_444.jpg, Err: , Ret: 198
Warning: PHP Jul 01 2003 12:32:31

getimagesize: Unable to open 'var/storage/variations/image/p/h/p/phplgvUsN_600x600_444.jpg' for reading. in /home/clean/public_html/kernel/classes/datatypes/ezimage/ezimagevariation.php on line 234
Warning: PHP Jul 01 2003 12:32:31

stat failed for var/storage/variations/image/p/h/p/phplgvUsN_600x600_444.jpg (errno=2 - No such file or directory) in /home/clean/public_html/kernel/classes/datatypes/ezimage/ezimagevariation.php on line 249
Error: Jul 01 2003 12:32:31

Could not create variation for var/storage/variations/image/p/h/p/phplgvUsN_600x600_444.jpg
Error: eZTemplate @ design/standard/templates/content/datatype/view/ezimage.tpl:8[14] Jul 01 2003 12:32:31

Cannot retrieve attribute of a boolean
Error: eZTemplate @ design/standard/templates/content/datatype/view/ezimage.tpl:8[45] Jul 01 2003 12:32:31

Cannot retrieve attribute of a boolean
Error: eZTemplate @ design/standard/templates/content/datatype/view/ezimage.tpl:8[67] Jul 01 2003 12:32:31

Cannot retrieve attribute of a boolean
Warning: PHP Jul 01 2003 12:32:31

Undefined variable: lang in /home/clean/public_html/kernel/classes/ezcontentobject.php on line 1155

Has anyone else experienced this odd problem and if so is their a solution?

Thanks
fats

-- Stuart

stuart@grandmore.com
http://www.grandmore.com

Selmah Maxim

Saturday 05 July 2003 1:30:22 am

HI ..

I think your using GD version 1.x , be sure from Image magic path, what you using (as i think) is for GD lib. !

ConvertPath=/usr/bin
ConvertExecutable=/usr/bin/convert

Stuart Fenton

Wednesday 16 July 2003 11:02:08 am

Thanks

All is well and good again.

Fats.

-- Stuart

stuart@grandmore.com
http://www.grandmore.com

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 16:01:04
Script start
Timing: Jan 18 2025 16:01:04
Module start 'layout'
Timing: Jan 18 2025 16:01:04
Module start 'content'
Timing: Jan 18 2025 16:01:05
Module end 'content'
Timing: Jan 18 2025 16:01:05
Script end

Main resources:

Total runtime0.7937 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0060 588.1719152.6563
Module start 'layout' 0.00600.0031 740.828139.5078
Module start 'content' 0.00910.7834 780.3359559.2109
Module end 'content' 0.79240.0012 1,339.546912.0938
Script end 0.7937  1,351.6406 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.4216160.0002
Check MTime0.00130.1626160.0001
Mysql Total
Database connection0.00070.086810.0007
Mysqli_queries0.728891.8200570.0128
Looping result0.00050.0608550.0000
Template Total0.763296.220.3816
Template load0.00210.264920.0011
Template processing0.761195.887820.3805
Template load and register function0.00020.019810.0002
states
state_id_array0.00100.131210.0010
state_identifier_array0.00080.104620.0004
Override
Cache load0.00190.2347660.0000
Sytem overhead
Fetch class attribute can translate value0.00050.068420.0003
Fetch class attribute name0.00170.209640.0004
XML
Image XML parsing0.00200.255820.0010
class_abstraction
Instantiating content class attribute0.00000.001250.0000
General
dbfile0.00230.2841160.0001
String conversion0.00000.001340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
18content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
15content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 40
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs