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

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

0 Members and 2 Guests are viewing this topic.

Offline orb4

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: [Mod] Image Annotation (Watermark)
« Reply #690 on: December 12, 2007, 09:17:39 AM »
Hi Kurt,you can sleep on both ears now. Cright is ok.


You should set this "Resulting image quality (in per cent)" in "Annotation Settings" to around 75 - 80. This will fix.

Thank you for the idea lqbaoanh.
So I made a test with 3 pics uploaded (3 different sizes) and with different "Resulting image quality" in % :

PIC 1: original Size=  10 kb -------------- with "Resulting image quality"= 100%------------ Size after upload=48,4kb       
PIC 1: original Size=  10 kb -------------- with "Resulting image quality"=   25%------------ Size after upload=10,7kb       
PIC 2: original Size=  98 kb -------------- with "Resulting image quality"= 100%------------ Size after upload=133kb       
PIC 2: original Size=  98 kb -------------- with "Resulting image quality"=   98%------------ Size after upload= 73kb
PIC 3: original Size=200 kb -------------- with "Resulting image quality"= 100%------------ Size after upload=358kb       
PIC 3: original Size=200 kb -------------- with "Resulting image quality"=   95%------------ Size after upload= 197kb
       

you can see that I cannot set "Resulting image quality" in only one paramater. It depends on each pic size.

maybe i can supress this "Resulting image quality" option in Watermark mod. But I do nnot really know how to...any ideas?
« Last Edit: December 12, 2007, 07:47:25 PM by orb4 »

Offline orb4

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: [Mod] Image Annotation (Watermark)
« Reply #691 on: December 17, 2007, 12:49:27 PM »
Hello,

I would like to remove the "Resulting image quality" function that compress pic at upload.
I tried to but I got problems to solve it.
Ive tried to remove all thes lines below, or tried leave some functions, but I always got the same problem at the upload:
If pic got the right size, there is not the watermark on, or the contrary
PLEASE HELP ME thank you.


-------------------------------------------
OPEN admin/ann_settings.php
-------------------------------------------

LINE 180: remove
show_setting_row("annotation_image_quality");

-------------------------------------------
OPEN includes/annotate.php
-------------------------------------------

LINE 54:
$ann_image_quality = $config['annotation_image_quality'];

LINE 145 :
$command = $convert_options['convert_path']." -quality ".$ann_image_quality." -draw \"image CopyOpacity $h_offset,$v_offset 0,0 $ann_embed_image\" \"$ann_src\" \"$ann_dest\"";

LINE 150 :
$command = $convert_options['convert_path']." -quality ".$ann_image_quality." -antialias -density 90 -font '$ann_font_path' -fill '$ann_fill_color' -pointsize $ann_font_size -draw \"text $h_offset,$v_offset '$ann_text'\"  \"$ann_src\" \"$ann_dest\"";

LINE 160 :
$command = $convert_options['convert_path']." -quality ".$ann_image_quality." -antialias -density 90 -font '$ann_font_path' -fill '$ann_fill_color' -pointsize $ann_font_size -draw \"text $h_offset,$v_offset '$ann_text'\"  \"$file_shd\" \"$ann_dest\"";

LINE 209 :
$command .= $convert_options['convert_path']."/pnmtojpeg -quiet -quality=".$ann_image_quality." -optimize > ".$ann_dest;

LINE 224 :
$command .= $convert_options['convert_path']."/pnmtojpeg -quiet -quality=".$ann_image_quality." -optimize > ".$ann_dest;

Offline SLL

  • Hero Member
  • *****
  • Posts: 585
    • View Profile
Re: [Mod] Image Annotation (Watermark)
« Reply #692 on: December 17, 2007, 03:25:27 PM »
you do not have to remove anything but -quality ".$ann_image_quality." from each line you find it

thought, i would not recomment to remove it, learn a bit about jpeg compression, set the quality to 70-80% and relax  :D

Offline orb4

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: [Mod] Image Annotation (Watermark)
« Reply #693 on: December 17, 2007, 06:57:53 PM »
Hi SLL,
I've done what you told:

-------------------------------------------
OPEN admin/ann_settings.php
-------------------------------------------

LINE 180: remove
show_setting_row("annotation_image_quality");

-------------------------------------------
OPEN includes/annotate.php
-------------------------------------------
remove : -quality ".$ann_image_quality."  in

LINE 145:
 $command = $convert_options['convert_path']." -quality ".$ann_image_quality." -draw \"image CopyOpacity $h_offset,$v_offset 0,0 $ann_embed_image\" \"$ann_src\" \"$ann_dest\"";

LINE 150:
 $command = $convert_options['convert_path']." -quality ".$ann_image_quality." -antialias -density 90 -font '$ann_font_path' -fill '$ann_fill_color' -pointsize $ann_font_size -draw \"text $h_offset,$v_offset '$ann_text'\"  \"$ann_src\" \"$ann_dest\"";

LINE 160:
$command = $convert_options['convert_path']." -quality ".$ann_image_quality." -antialias -density 90 -font '$ann_font_path' -fill '$ann_fill_color' -pointsize $ann_font_size -draw \"text $h_offset,$v_offset '$ann_text'\"  \"$file_shd\" \"$ann_dest\"";

---------------------------

But pic size is 98ko and once it is uploaded it is 50ko. What's wrong with this?


Offline SLL

  • Hero Member
  • *****
  • Posts: 585
    • View Profile
Re: [Mod] Image Annotation (Watermark)
« Reply #694 on: December 17, 2007, 09:41:08 PM »
But pic size is 98ko and once it is uploaded it is 50ko. What's wrong with this?

just nothing wrong with it :lol:        are you always reading only first line of message?  :roll:

Offline orb4

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: [Mod] Image Annotation (Watermark)
« Reply #695 on: December 17, 2007, 11:25:56 PM »
ok, no stress for me, but is there a way to fix this to get exact pic size info at upload? Is it even possible ?  (dont tell me to remove watermark mod to please  :))

Offline SLL

  • Hero Member
  • *****
  • Posts: 585
    • View Profile
Re: [Mod] Image Annotation (Watermark)
« Reply #696 on: December 18, 2007, 01:06:57 PM »
ok, no stress for me, but is there a way to fix this to get exact pic size info at upload? Is it even possible ?  (dont tell me to remove watermark mod to please  :))

yeeeah!! just remove watermark mod, and you pics will stay intact!  :P

actually, you are combining two pics together - original, and another one with text... then why the hell the final image size should be the same as original???

Offline orb4

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: [Mod] Image Annotation (Watermark)
« Reply #697 on: December 18, 2007, 07:57:46 PM »
only because uploaded pics size is almost double sized. it is not very significative in little sizes but imagine you got a 1mo pic, at upload it is almost 2Mo for a 70-80%.

 But even if it is a really good mod, thanks to you,  i'm gonna stop here and try instead of a watermark software.
ciao.

Offline SLL

  • Hero Member
  • *****
  • Posts: 585
    • View Profile
Re: [Mod] Image Annotation (Watermark)
« Reply #698 on: December 19, 2007, 01:43:45 PM »
this "double sized" has nothing to do with the mod, this is just the way gd lib is handling your image. the only parameter responsible for this is "quality", which is image compression ratio. i have no idea, if there's any possibility to obtain the original image compression value and set output the same on fly. honestly, i doubt it.

Offline orb4

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: [Mod] Image Annotation (Watermark)
« Reply #699 on: January 03, 2008, 06:49:52 PM »
hi,
I got another problem:
when I upload a pic , after I can see the watermark.
But if I edit the pic and reupload it (with browse button)  there is no watermark after !
If I edit this pic changing name, description, etc, after the watermark is still present.

normally does watermark works on "edit /re upload pic" ?

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [Mod] Image Annotation (Watermark)
« Reply #700 on: January 03, 2008, 06:54:11 PM »
I check in annotate.php file. No code for say if file exist or no exist. Is problem for re-upload file with edit. ;)
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline orb4

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: [Mod] Image Annotation (Watermark)
« Reply #701 on: January 04, 2008, 09:02:50 PM »
I check in annotate.php file. No code for say if file exist or no exist. Is problem for re-upload file with edit. ;)

What do you mean??
Should I consider that my problem here could be solved by developping the corresponding "coding" so that watermark show correctly on re-uploaded pics?
can you confirm it is a "bug"?

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [Mod] Image Annotation (Watermark)
« Reply #702 on: January 04, 2008, 09:29:08 PM »
Quote
can you confirm it is a "bug"?

Is no bug. Is a miss-routine check. ;)
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline orb4

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: [Mod] Image Annotation (Watermark)
« Reply #703 on: January 06, 2008, 12:22:17 PM »


On my own I don't really know how to introduce this new part of code in annotate.php and in another files and in database?

Which files must be modified? : only annotate.php?   

Offline orb4

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: [Mod] Image Annotation (Watermark)
« Reply #704 on: January 07, 2008, 06:05:02 PM »
UP ! could SLL or anyone give support for my question please?