/    Sign up×
Community /Pin to ProfileBookmark

ImageMagik Image Resize issues

The below code is what i echoed out when debugging the problem I am having.

All of the code is spot on size wise BUT the images that are produced are
thumb = 105px X 79px
detail = 600px X 450px

The constants that define the max dimensions are:

[code=php]define(“IMG_THUMB_WIDTH”, 132);
define(“IMG_THUMB_HEIGHT”, 106);
define(“IMG_NORMAL_WIDTH”, 200);
define(“IMG_NORMAL_HEIGHT”, 200);
define(“IMG_DETAIL_WIDTH”, 800);
define(“IMG_DETAIL_HEIGHT”, 600);[/code]

[CODE]
[B]Thumbnail:[/B]
width when width greater than height: 132
width when width greater than height: 79.5

size X*Y 132×79 (79 is 79.5 floored )

exec() ImageMagik Code echoed:
convert -density 72 -resize 132×79 -quality 85 ‘/home/httpd/vhosts/domain.com/subdomains/website/httpdocs/images/gallery/20080223123924.jpg’ ‘/home/httpd/vhosts/domain.com/subdomains/website/httpdocs/images/gallery/20080223123924_thumb.jpg’

[B]Detail image:[/B]
width when width greater than height: 800
width when width greater than height: 450

size X*Y = 800×450

exec() ImageMagik Code echoed:
convert -density 72 -resize 800×450 -quality 85 ‘/home/httpd/vhosts/domain.com/subdomains/website/httpdocs/images/gallery/20080223123926.jpg’ ‘/home/httpd/vhosts/domain.com/subdomains/website/httpdocs/images/gallery/20080223123926_detail.jpg’
[/CODE]

Thanks in advance

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@knowjauthorFeb 23.2008 — Issue fixed. The problem was me calculating the dimensions wrong.

It was resizing width 12% and height 10% then image magic was resizing within the dimensions of 10%.
×

Success!

Help @knowj spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...