• [MOD] Histogram 4 0 5 1
Currently:  

Author Topic: [MOD] Histogram  (Read 221391 times)

0 Members and 1 Guest are viewing this topic.

Offline IcEcReaM

  • Hero Member
  • *****
  • Posts: 714
    • View Profile
    • My little Testboard
Re: [req mod] histogram
« Reply #15 on: February 28, 2006, 12:53:40 AM »
hey mawenzi,
wouldn't it be better if you post it then in an seperate mod thread?
Coding is a everlasting competition between programmers who tries to write larger, better and idiot-safe programs and the universe producing larger and stupider idiots...
...so far the universe won
bump

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [req mod] histogram
« Reply #16 on: February 28, 2006, 01:23:01 AM »
@ cheribibi,
an English translation is coming soon ... :wink:

@Loda,
warst ja wieder schneller als die Polizei erlaubt, danke für das Testen ... :mrgreen:

@om6acw,
tried my best ... found your inquiry very interesting ... :D

@ IcEcReaM,
nach dem Vorgeplänkel habe ich nicht gedacht, dass ein allgemeines Interesse besteht bzw. sich entwickeln könnte. Hast natürlich Recht ...  :wink: . Werde mit der englischen Übersetzung die Sache als MOD posten ...  :!:

mawenzi
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline IcEcReaM

  • Hero Member
  • *****
  • Posts: 714
    • View Profile
    • My little Testboard
Re: [req mod] histogram
« Reply #17 on: February 28, 2006, 01:34:40 AM »
@ IcEcReaM,
nach dem Vorgeplänkel habe ich nicht gedacht, dass ein allgemeines Interesse besteht bzw. sich entwickeln könnte. Hast natürlich Recht ...  :wink: . Werde mit der englischen Übersetzung die Sache als MOD posten ...  :!:

mawenzi

naja unterschätze mal die User nicht, die bauen sich alles ein, was sie bekommen können..^^
Aber mal ernst, ist denke ich immer besser, sowas als Mod zu posten,
da es dann bei der Suche nacher einfach ist,
wenn man gleich erkennen kann, dass es sich bei dem Thread um einen Mod handelt.
Coding is a everlasting competition between programmers who tries to write larger, better and idiot-safe programs and the universe producing larger and stupider idiots...
...so far the universe won
bump

Offline Loda

  • Sr. Member
  • ****
  • Posts: 353
    • View Profile
    • Fotosucht Schweiz
Re: [req mod] histogram
« Reply #18 on: February 28, 2006, 08:52:34 AM »
hallo!
i want to change the background for the histogramm. i want to insert an image as background for it. how can i do this?

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
Re: [req mod] histogram
« Reply #19 on: February 28, 2006, 09:01:01 AM »
Replace
Code: [Select]
$im_out = imageCreate (280, 164);with:
Code: [Select]
$im_out = imageCreateFromPNG ("background.png");then upload your background.png image into same directory where histo.php is.
P.S. make sure the image is 280x164
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 Loda

  • Sr. Member
  • ****
  • Posts: 353
    • View Profile
    • Fotosucht Schweiz
Re: [req mod] histogram
« Reply #20 on: February 28, 2006, 11:12:10 PM »
jepp... thank you!

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
Re: [req mod] histogram
« Reply #21 on: March 01, 2006, 12:52:45 AM »
And how accurate this histogram is? can someone compare it with some software that also has histogram?
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 om6acw

  • Full Member
  • ***
  • Posts: 187
    • View Profile
    • My Animal's World
Re: [req mod] histogram
« Reply #22 on: March 01, 2006, 08:43:45 AM »
And how accurate this histogram is? can someone compare it with some software that also has histogram?


For me looks exactly same :
http://www.myanimalsworld.com/sk/details.php?image_id=147

« Last Edit: March 02, 2006, 02:35:40 AM by om6acw »

Offline Loda

  • Sr. Member
  • ****
  • Posts: 353
    • View Profile
    • Fotosucht Schweiz
Re: [req mod] histogram
« Reply #23 on: March 02, 2006, 05:21:23 PM »
And how accurate this histogram is? can someone compare it with some software that also has histogram?
exactly the same! i think...
1. screenshoot of an imageprogram
2. scrennshoot of the histogram in 4images

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
Re: [req mod] histogram
« Reply #24 on: March 03, 2006, 01:44:52 AM »
Great!
There are some ways to improve this:
1) instead of sending the image path to histo.php, send only the image id and let histo.php get all needed info about where the image is. This also will help people who is using the code from "pic security" topic that hides real path of the images.
2) caching the historgram images. As far as I understood the code of histo.php, it scans every single pixel in the image and it is quiet havy for a server. So saving the result into a file and then showing the saved image would improve the perfomance, but will take up more space on the server...

[EDIT]
never mind my 2) note...its already present... :oops:
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 mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [req mod] histogram
« Reply #25 on: March 03, 2006, 02:35:13 AM »
Great!

... it works really great ... !

... This also will help people who is using the code from "pic security" topic that hides real path of the images.

... but where is the real path shown ... ?
... hist_path is also needed for hist_file (histo.png) ... ! ... or you stores the histo.png's in a new / extra folder ...
... like always ... there are several ways / solutions ...


[EDIT]
never mind my 2) note...its already present... :oops:

...  :mrgreen:  ...
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

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
Re: [req mod] histogram
« Reply #26 on: March 03, 2006, 02:42:56 AM »
... but where is the real path shown ... ?
... hist_path is also needed for hist_file (histo.png) ... ! ... or you stores the histo.png's in a new / extra folder ...
... like always ... there are several ways / solutions ...

this path:[qcode]histogramm.php?hist_image=kilimanjaro_axxxxi_2.jpg&hist_path=data/media/XX/&hist_file=02_hist_kilimanjaro_axxxxi_2.png[/qcode](filename and path altered in this example)
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 mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [req mod] histogram
« Reply #27 on: March 03, 2006, 04:53:41 AM »
V@no ... you are right ... like always ... :!:

I've changed the code in details.php and histogramm.php ... and now is only send the hist_image_id to histogramm.php ... that's  saver .
It works really greater ... !

and no path is shown ...
Code: [Select]
histogramm.php?hist_image_id=xxxx

thanks for the reference ...
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline ch€ri{Bi}²

  • Sr. Member
  • ****
  • Posts: 315
  • A PRoBLeM wIthOUt SoLuTioN Is NoT rEAllY a PRoBLeM
    • View Profile
    • Pat's Gallery
Re: [req mod] histogram
« Reply #28 on: March 03, 2006, 11:33:56 AM »
Replace
Code: [Select]
$im_out = imageCreate (280, 164);with:
Code: [Select]
$im_out = imageCreateFromPNG ("background.png");then upload your background.png image into same directory where histo.php is.
P.S. make sure the image is 280x164

well i guess all the code is based on this size... so all graphics are drawn referring to this size...
... and how can i change the size of the output history picture (with graphics..)?
 
ch€ri{Bi}²


Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [req mod] histogram
« Reply #29 on: March 03, 2006, 10:05:01 PM »
... and how can i change the size of the output history picture (with graphics..)?

... you can change width and height for 'imageCreate' ...
... but then you must adapt also the coordinates in all 'imageLine' to your new width and height ...
... but the inner coordinates for width=255 should not be changed i.m.o. ...
... it is the graph from left (darkest) to right (brightest) ("RGB-Farbraum" ... 8 Bits ... 0 - 255 ... 28=256 ) ...
... you can change through test ...

But I found some other little problems.
... by saving the hist_xxx.png in the cat-folders you find all these images in APC -> Check new images ...  :?
... but when we save all the hist_'image_media_file'.png in a new folder e.g. /data/media/histo ... there can be also problems ...
... there is the possibility, that 2 pictures from different folders have the same file name ...
... and than is hist_'image_media_file'.png = hist_media_file.png  in the same folder ...
... it sould be better we create the names of the histo.png with image_ids like hist_'image_id'.png ...
... and save the hist_'image_id'.png in /data/media/histo ...

I will try that in such a way ... or there are other suggestions ...  :roll:

mawenzi
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...