Forums / Developer / Images corrupt when being converted and saved. Any solutions?

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

eZ debug

Timing: Jan 18 2025 11:34:14
Script start
Timing: Jan 18 2025 11:34:14
Module start 'content'
Timing: Jan 18 2025 11:34:14
Module end 'content'
Timing: Jan 18 2025 11:34:14
Script end

Main resources:

Total runtime0.2050 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0074 589.1016180.7969
Module start 'content' 0.00740.0051 769.898497.9766
Module end 'content' 0.01250.1923 867.8750533.4219
Script end 0.2049  1,401.2969 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00341.6526200.0002
Check MTime0.00140.6778200.0001
Mysql Total
Database connection0.00120.571810.0012
Mysqli_queries0.156476.29801410.0011
Looping result0.00150.73961390.0000
Template Total0.191893.610.1918
Template load0.00080.396710.0008
Template processing0.191093.185510.1910
Override
Cache load0.00060.284910.0006
Sytem overhead
Fetch class attribute can translate value0.00090.449410.0009
XML
Image XML parsing0.00020.104810.0002
General
dbfile0.00261.2455200.0001
String conversion0.00000.004430.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0002 secs