Image upload quality problem
6 posts by 4 authors in: Forums > CMS Builder
Last Post: June 26, 2009 (RSS)
By yallaf1 - June 25, 2009
I am uploading gif banners onto my site. The size defined is 468x60.
The problem is that the image published is blown up (see attachment PICTUREPROBS.jpg) and instead of the crisp original we are left with a fuzzy image which is published size 521x68 - which looks terrible and seeing this is for advertising it should look crisp and clean...
Attached is also screen grab of the Admin Settings for my Ad area.
Need to know:
1. why the image is "growing" on the page.
2. fix for this so the image we upload is the image we see.
Thanx
PV
[mad]
Re: [yallaf1] Image upload quality problem
By Damon - June 25, 2009
What might be happening is the image sizes may be hard coded into the page. A banner that is uploaded with a different size would then be made smaller or larger than it's actual size and the image quality would be effected. I'm not sure this is the case but it seems possible.
Can you send a link to the page with the banner displayed?
Damon Edis - interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [Damon] Image upload quality problem
By yallaf1 - June 25, 2009
Advert is for Qatar Airways
Link: http://www.yallaf1.com/news-latest.php
Cheers
PV
Re: [yallaf1] Image upload quality problem
By ross - June 25, 2009
Could you actually post a copy of that page instead of just a link. Going right to the link doens't actually help in this case as it's impossible to tell if CMS Builder produced those attributes or if they were on the template already.
Perhaps ask Nigel to email it over to me :).
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com
Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/
Re: [ross] Image upload quality problem
Here's the code for the page in question:
======
<?php header('Content-type: text/html; charset=utf-8'); ?>
<?php
require_once "/home/yallaf5/public_html/cmsAdmin/lib/viewer_functions.php";
list($masthead_ad_daily_newsRecords, $masthead_ad_daily_newsMetaData) = getRecords(array(
'tableName' => 'masthead_ad_daily_news',
'where' => whereRecordNumberInUrl(1),
'limit' => '1',
));
$masthead_ad_daily_newsRecord = @$masthead_ad_daily_newsRecords[0]; // get first record
// show error message if no matching record is found
if (!$masthead_ad_daily_newsRecord) {
print "Record not found!";
exit;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<link href="styles.css" rel="stylesheet" type="text/css" />
<meta name="ROBOTS" content="NOINDEX" /></HEAD>
<body class="bodyLeft">
<table width="400" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><!-- STEP2: Display Records (Paste this where you want your records to be listed) -->
<!-- STEP 2a: Display Uploads for field 'content' (Paste this anywhere inside STEP2 to display uploads) -->
<!-- Upload Fields: num, createdTime, tableName, fieldName, recordNum, preSaveTempId, filePath, filename, extension, thumbFilePath, isImage, hasThumbnail, urlPath, width, height, thumbUrlPath, thumbWidth, thumbHeight, info1, info2, info3, info4, info5 -->
<?php foreach ($masthead_ad_daily_newsRecord['content'] as $upload): ?>
<?php if ($upload['extension'] == 'swf'): ?>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="468" height="60">
<param name="movie" value="gn_swf/GN24062/GN24062.swf" />
<param name="quality" value="high" />
<!-- STEP2: Display Records (Paste this where you want your records to be listed) -->
<!-- STEP 2a: Display Uploads for field 'flash_banner_ad' (Paste this anywhere inside STEP2 to display uploads) -->
<!-- Upload Fields: num, createdTime, tableName, fieldName, recordNum, preSaveTempId, filePath, filename, extension, thumbFilePath, isImage, hasThumbnail, urlPath, width, height, thumbUrlPath, thumbWidth, thumbHeight, info1, info2, info3, info4, info5 -->
<?php foreach ($masthead_ad_daily_newsRecord['content'] as $upload): ?>
<embed src="<?php echo $upload['urlPath'] ?>" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="468" height="60">
<?php endforeach ?>
<!-- STEP2a: /Display Uploads -->
<?php if (!$masthead_ad_daily_newsRecord): ?>
<?php endif ?>
<!-- /STEP2: Display Records -->
</embed>
</object>
<?php elseif ($upload['hasThumbnail']): ?>
<a href="<?php echo $masthead_ad_daily_newsRecord['title'] ?>" target="_blank"><img src="<?php echo $upload['urlPath'] ?>" alt="" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" border="0" /></a>
<?php elseif ($upload['isImage']): ?>
<a href="<?php echo $masthead_ad_daily_newsRecord['title'] ?>" target="_blank"><img src="<?php echo $upload['urlPath'] ?>" alt="" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" border="0" /></a>
<?php else: ?>
<?php endif; ?>
<?php endforeach ?>
<!-- STEP2a: /Display Uploads -->
<?php if (!$masthead_ad_daily_newsRecord): ?>
<?php endif ?>
<!-- /STEP2: Display Records --></td>
</tr>
</table>
</body>
</html>
======
Cheers,
Common Sense Design: User-focused Web design
Tel: 001 519 342 5348 | Web: www.commonsensedesign.net
Re: [NigelGordijk] Image upload quality problem
By ross - June 26, 2009
Thanks for posting that :).
Anytime you use: $upload['width'] you are going to be pulling it from the database.
If your images aren't coming in at the right size, you'll want to adjust that setting. You'll find it by modifying that field in your section editor and clicking to the advanced options.
Have a look and make sure that you notice there is a link that lets you re-create all the thumbnails.
Thanks!
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com
Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/