Hello
I need help with this script:
$column = &$pntable['phones_subcategories_column'];
$table = $pntable['phones_subcategories'];
$column1 = &$pntable['phones_information_column'];
$table1 = $pntable['phones_information'];
$result2=$dbconn->Execute("SELECT $column[sid], $column[cid],
$column[title], $column1[sid], $column1[lid], $column1[title], $column1[URL]
FROM $table, $table1
WHERE $column[sid] = $column1[sid] and $column[sid]= ".pnVarPrepForStore($sid)."");
while(list($sid, $cid, $title, $lsid, $llid, $ltitle, $URL)=$result2->fields) {
$result2->MoveNext();
OpenTable2();
$image_name = $URL;//full path to image, path are added to database
$wallname = "images/watermark.gif";
$image_size = getimagesize($image_name);
$wall_size = getimagesize($wallname);
$image = imagecreatetruecolor($image_size[0],$image_size[1]);
$image = imagecreatefromjpeg($image_name);
$wallmark = imagecreatefromgif($wallname);
imagecopymerge($image,$wallmark,10,350,0,0,$wall_size[0],$wall_size[1],100);
imagedestroy($wallmark);
header( "Content-type: image/jpeg");
imagejpeg($image);
CloseTable2();
}
The problem: if i use this script in a postnuke page, i get error (i mean a lot of strange text and no image). In a normal page without any HTML tags and $image_name set it to a "usual" image (like "modules/ModuleName/image.jpg) it's work perfect. What could be the problem?
Thanks
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 07:01 AM
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 06:41 AM
- ehdwma created topic »Hide "Register new account" and change template to 3 col« 06:27 AM
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 01:29 AM
- mdee created topic »How to implement returnpage ?« 01:00 AM
- nestormateo responded to »Fillters in Clip« 24. May
- damon responded to »Can the Updated Version Check be Turned Off (Z 1.3)« 24. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
Watermark image error
-
- Rank: Softmore
- Registered: Feb 07, 2003
- Last visit: Jun 11, 2008
- Posts: 225
Can you show us the code that includes this image.
Looks like you may be trying to display the image in-line. It should be part of an 'IMG' tag. -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Apr 26, 2005
- Posts: 16
Here is the full code:
and you can see an example of error received here:
http://www.my3gmobil…wtest&lid=43&sid=13 -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Apr 26, 2005
- Posts: 16
I still ask for help here. Can anybody help me, please? i try with img src, without img src, and every other options..nothing work...please, did anybody have a good script to watermark dynamic images and fully functional in postnuke pages? -
- Rank: Softmore
- Registered: Feb 07, 2003
- Last visit: Jun 11, 2008
- Posts: 225
I looked at your site. You are trying to output the image data inline with the rest of the HTML code. This doesn't work.
The 'src=' attribute can point to a static image, but you want to add a watermark. To do this the 'src=' attribute has to point to PHP code that reads to image and adds the watermark.
- Moderated by:
- Support
