• [Mod] Image Annotation (Watermark) 2 0 5 1
Currently:  

Author Topic: [Mod] Image Annotation (Watermark)  (Read 992589 times)

0 Members and 1 Guest are viewing this topic.

Offline nccsoft

  • Pre-Newbie
  • Posts: 5
    • View Profile
[Mod] Image Annotation (Watermark)
« Reply #225 on: June 25, 2003, 03:29:44 AM »
I am working...

I try step to step.

Code: [Select]
$s ="/usr/local/bin/convert -quality 80 -antialias -density 90 -font /home/mychat/htdocs/4images/BGTR00BU.TTF -fill #BFBFBF -pointsize 14 -draw \"text 5,22 'http://phpbb.mychat.to'\" \"./data/media/7/DSCN0658.JPG.bak\" \"./data/media/7/DSCN0658.JPG\"";
system($s);


not work. so I try

Code: [Select]
$s ="/usr/local/bin/convert -quality 80 -antialias -density 90 -font /home/mychat/htdocs/4images/BGTR00BU.TTF \"./data/media/7/DSCN0658.JPG.bak\" \"./data/media/7/DSCN0658.JPG\"";
system($s);


It's work. so I try

Code: [Select]
$s ="/usr/local/bin/convert -quality 80 -antialias -density 90 -font /home/mychat/htdocs/4images/BGTR00BU.TTF -fill #BFBFBF \"./data/media/7/DSCN0658.JPG.bak\" \"./data/media/7/DSCN0658.JPG\"";
system($s);


It's no work. so I try

Code: [Select]
$s ="/usr/local/bin/convert -quality 80 -antialias -density 90 -font /home/mychat/htdocs/4images/BGTR00BU.TTF -fill \"#BFBFBF\"  \"./data/media/7/DSCN0658.JPG.bak\" \"./data/media/7/DSCN0658.JPG\"";
system($s);


It's work.. so I try

Code: [Select]
$s ="/usr/local/bin/convert -quality 80 -antialias -density 90 -font /home/mychat/htdocs/4images/BGTR00BU.TTF -fill \"#BFBFBF\" -pointsize 14 -draw \"text 5,22 'http://phpbb.mychat.to'\" \"./data/media/7/DSCN0658.JPG.bak\" \"./data/media/7/DSCN0658.JPG\"";
system($s);


It's ok. so I modify annotate.php and batch_annotate.php

find
Code: [Select]
-fill $ann_shadow_color
replace
Code: [Select]
-fill \"$ann_shadow_color\"

but I have new problem now.
My text is chinese charset. if I use Chinese text. not show Chinese.
only use english now.
--
Digital man & womam http://phpbb.mychat.to

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
[Mod] Image Annotation (Watermark)
« Reply #226 on: June 25, 2003, 04:31:02 AM »
Quote from: nccsoft
but I have new problem now.
My text is chinese charset. if I use Chinese text. not show Chinese.
only use english now.

I belive for this u'll need upload your own font with Chinese support.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline SLL

  • Hero Member
  • *****
  • Posts: 585
    • View Profile
[Mod] Image Annotation (Watermark)
« Reply #227 on: June 25, 2003, 10:58:20 AM »
Quote from: V@no
I belive for this u'll need upload your own font with Chinese support.

i'm not sure this will help. this is the way image magick handles charsets... for example, i haven't managed writing cyrillic text with im too  :cry:

Offline SLL

  • Hero Member
  • *****
  • Posts: 585
    • View Profile
[Mod] Image Annotation (Watermark)
« Reply #228 on: June 25, 2003, 10:59:48 AM »
Quote from: Yegor
will there be an upgrade? or do u have to revert to "original files" before you install?

yes, you do.

Offline SLL

  • Hero Member
  • *****
  • Posts: 585
    • View Profile
new version with netpbm support
« Reply #229 on: June 25, 2003, 02:15:29 PM »
so... any volunteers to test new mod version before publishing?  :wink:
mostly netpbm users on *nix machine needed...

Offline xtase

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
    • http://www.xtase.net
[Mod] Image Annotation (Watermark)
« Reply #230 on: June 25, 2003, 06:46:25 PM »
Hi !

hm i have a question ... is it necessary to test this program "in the web" ... i have only checked it on my localhost and i got "Could not find/open font" because i´m not sure where i have to put tahoma.ttf ...

my structure looks like this ...

http://localhost/gallery/admin ....

which place is important for the font ? ... an which path i write in the box in admin center ?

year and when i upload one image i geht this error "Warning: Could not find/open font in C:\wampp2039\htdocs\gallery\includes\annotate.php on line 78" ... this is clear the fontpart is wrong ... but what is wrong can you help me PLZ :)

sorry for my bad english  :roll:

Offline SLL

  • Hero Member
  • *****
  • Posts: 585
    • View Profile
[Mod] Image Annotation (Watermark)
« Reply #231 on: June 25, 2003, 06:49:12 PM »
Quote from: xtase
which place is important for the font ?

it doesn't matter where you put it, just specify full path and filename CP

Offline xtase

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
    • http://www.xtase.net
[Mod] Image Annotation (Watermark)
« Reply #232 on: June 25, 2003, 06:52:18 PM »
Quote from: SLL
Quote from: xtase
which place is important for the font ?

it doesn't matter where you put it, just specify full path and filename CP


but i get an error ... i have written "c:\wampp2039\htdocs\gallery\tahoma.tff" in my box ... i have already checked it without .tff ...

note i check this offline on my localhost is this the problem ?

Offline SLL

  • Hero Member
  • *****
  • Posts: 585
    • View Profile
[Mod] Image Annotation (Watermark)
« Reply #233 on: June 25, 2003, 07:11:56 PM »
Quote from: xtase
but i get an error ... i have written "c:\wampp2039\htdocs\gallery\tahoma.tff" in my box ... i have already checked it without .tff ...

note i check this offline on my localhost is this the problem ?

maybe you'd try tahoma.ttf then?  :wink:

and for sure localhost is not a problem at all...

Offline SLL

  • Hero Member
  • *****
  • Posts: 585
    • View Profile
[Mod] Image Annotation (Watermark)
« Reply #234 on: June 25, 2003, 07:14:09 PM »
Version 1.4 just posted (look first message in this thread). Now with NetPBM support + some minor changes, corrections and code cleanup.

Offline Yegor

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
    • http://www.planetboredom.net
[Mod] Image Annotation (Watermark)
« Reply #235 on: June 25, 2003, 09:52:12 PM »
Ok, I just installed it.
V@no's fix stopped giving me any errors, so tahts good.

NetPBM isn't working, when I select it, and uplaod a JPG, all I get is a broken image. It creates a thumbnail, but the image appears broken.

Gifs are not annotated, but work.

If I leave it as GD2, everything works good, jpgs are annotated, and Gifs are thumbnailed using Netpbm (thanks to V@no's fix). No errors pop up.
Without the fix, it doesn't work, gifs cause it to display an error.

Something weird happened when I moved servers. The Embedded image opacity no longer works. No matter what I set it to, its all 100% here is the GD info.

GD Support  enabled  
GD Version  bundled (2.0.12 compatible)  
FreeType Support  enabled  
FreeType Linkage  with freetype  
GIF Read Support  enabled  
JPG Support  enabled  
PNG Support  enabled  
WBMP Support  enabled  
XBM Support  enabled  


Any ideas?
PlanetBoredom.net
 - Things to do when you are bored.  [ Advertise ]

Offline SLL

  • Hero Member
  • *****
  • Posts: 585
    • View Profile
[Mod] Image Annotation (Watermark)
« Reply #236 on: June 25, 2003, 10:06:11 PM »
Quote from: Yegor
NetPBM isn't working, when I select it, and uplaod a JPG, all I get is a broken image. It creates a thumbnail, but the image appears broken.

in order to run this mod with netpbm the whole package have to be installed, or at least the following parts have to be in the netpbm path:

jpegtopnm
pbmtext
pngtopnm
pnmcomp
pnmtojpeg
ppmchange
ppmcolormask


then, you need x-window bdf fonts (not true type!). and finally, you have to specify netpbm path like this: /usr/local/netpbm/  (just path, no binaries!), and finally, /4images/data/media/  should be set "write all" if not set yet

Offline Yegor

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
    • http://www.planetboredom.net
[Mod] Image Annotation (Watermark)
« Reply #237 on: June 25, 2003, 11:01:54 PM »
I have all those parts installed.
I don't use text annotation, I use image.
PlanetBoredom.net
 - Things to do when you are bored.  [ Advertise ]

Offline SLL

  • Hero Member
  • *****
  • Posts: 585
    • View Profile
[Mod] Image Annotation (Watermark)
« Reply #238 on: June 25, 2003, 11:13:25 PM »
Quote from: Yegor
I don't use text annotation, I use image.

it doesn't matter, they're all still used (except pbmtext)

try the following: temporarily remove all "-quiet" from comman lines, just to see if some error message genereted. if it will not help - put echo $command; after each system($command); line and check

Offline Yegor

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
    • http://www.planetboredom.net
[Mod] Image Annotation (Watermark)
« Reply #239 on: June 25, 2003, 11:22:20 PM »
Correction, I just asked my ISP, some components ARE missing:
pnmcomp
pnmtojpeg
ppmchange
ppmcolormask

They are gonn set that up ASAP. Ill leave feedback once they do.
Everything else seems to work flawlessly! Good job!

A weird problem that I noticed before I even upgraded (after I moved servers) is that Embedded image opacity no longer worked. This is not related to the new version, its something on the server. ANy ideas?
PlanetBoredom.net
 - Things to do when you are bored.  [ Advertise ]