Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - udo w.

Pages: [1]
1
Mods & Plugins (Releases & Support) / Re: [MOD] Histogram
« on: September 23, 2006, 12:53:27 PM »
Hallolo.. :D

Also irgendwie funktionierts und irgendwie funktionierts auch wieder nicht....
Bei manchen Bildern wird ein "Histogramm" angelegt - bei anderen habe ich immer noch das weiße Blatt...
Das Histogramm das angezeigt wird sieht so aus:

http://www.entscheidende-augenblicke.de/details.php?image_id=86

oder so:

http://www.entscheidende-augenblicke.de/details.php?image_id=19 

Hier der Code der Histo.php

Code: [Select]
<?php
//      Histogram creation
//      Created by Anton Sparrius (Spaz) 6/9/05  anton_spaz@yahoo.com
//      Free to use and change, provided you keep these lines :)


if (isset($HTTP_GET_VARS['hist_image']) || isset($HTTP_POST_VARS['hist_image'])) {
  $hist_image = (isset($HTTP_GET_VARS['hist_image'])) ? stripslashes(trim($HTTP_GET_VARS['hist_image'])) : stripslashes(trim($HTTP_POST_VARS['hist_image']));
}
else {
  $hist_image "";
}

if (isset(
$HTTP_GET_VARS['hist_path']) || isset($HTTP_POST_VARS['hist_path'])) {
  $hist_path = (isset($HTTP_GET_VARS['hist_path'])) ? stripslashes(trim($HTTP_GET_VARS['hist_path'])) : stripslashes(trim($HTTP_POST_VARS['hist_path']));
}
else {
  $hist_path "";
}

if (isset(
$HTTP_GET_VARS['hist_file']) || isset($HTTP_POST_VARS['hist_file'])) {
  $hist_file = (isset($HTTP_GET_VARS['hist_file'])) ? stripslashes(trim($HTTP_GET_VARS['hist_file'])) : stripslashes(trim($HTTP_POST_VARS['hist_file']));
}
else {
  $hist_file "";
}

//                        $hist_image = $_REQUEST['image'];
//                        $hist_path = $_REQUEST['filepath'];
//                        $hist_path = "albums/".$hist_path;
                        


                        
if (file_exists($hist_path.$hist_file)) {
                          $im=imagecreatefromPNG($hist_path $hist_file);
                          imagePNG($im);
                          imagedestroy($im);
                        } else {
                        $im=imagecreatefromjpeg($hist_path.$hist_image);
                        for($i=0;$i<imagesx($im);$i+=2)
                        {
                                for($j=0;$j<imagesy($im);$j++)
                                {
                                        $rrggbb=imagecolorsforindex ($imimagecolorat($im,$i,$j));
                                        $r[$rrggbb['red']]+=1;
                                        $g[$rrggbb['green']]+=1;
                                        $b[$rrggbb['blue']]+=1;
                                }
                        }
                        for ($i=0;$i<256;$i++)
                        {
                                $max[$i]=($r[$i]+$g[$i]+$b[$i])/3;
                        }
                        
                        $max_value
=max($max)/150;
                        $m[0]=max($r);
                        $m[1]=max($b);
                        $m[2]=max($g);
                        $max_rgb=max($m)/150;

                        $im_out imageCreate (280164);
                        $background imageColorAllocate($im_out,70,70,70);
                        $hist=ImageColorAllocate($im_out,0,0,0);
                        $white=ImageColorAllocate($im_out,143,143,134);
                        $red=ImageColorAllocate($im_out,255,0,0);
                        $green=ImageColorAllocate($im_out,0,255,0);
                        $blue=ImageColorAllocate($im_out,0,0,255);
                        $ry=107;
                        $gy=107;
                        $by=107;

                        for($i=0;$i<256;$i++)
                      
                        
{
                                imageLine($im_out$i+14157$i+14157-($max[$i]/$max_value),$white);
                                imageLine($im_out$i+13$ry$i+14157-($r[$i]/$max_rgb), $red);
                                imageLine($im_out$i+13$gy$i+14157-($g[$i]/$max_rgb), $green);
                                imageLine($im_out$i+13$by$i+14157-($b[$i]/$max_rgb), $blue);
                                $ry=157-($r[$i]/$max_rgb);
                                $gy=157-($g[$i]/$max_rgb);
                                $by=157-($b[$i]/$max_rgb);
                        }
                        imageLine($im_out,13,158,270,158,$hist);
                        imageLine($im_out,13,6,270,6,$hist);
                        imageLine($im_out,13,6,13,158,$hist);
                        imageLine($im_out,270,6,270,158,$hist);

                        imagePNG($im_out,$hist_path $hist_file);
                        imageDestroy($im);
                        imagedestroy($im_out);
                        $im=imagecreatefromPNG($hist_path $hist_file);
                        imagePNG($im);
                        imagedestroy($im);
                        }
?>



...hier der Code der detais.php

Code: [Select]
<?php
//-----------------------------------------------------
//--- Show Image --------------------------------------
//-----------------------------------------------------

//--- Start Histogramm 27.02.2006 ----------------------
$hist_image $image_row['image_media_file'] ;
$hist_file"hist_".substr($hist_image,0,strlen($hist_image)-4).".png";
$hist_path "data/histo/";

$ext substr($hist_imagestrpos($hist_image".")+1strlen($hist_image));
$AutorisedImageType = array ("jpg""jpeg""JPG""JPEG");  // Dateitypen für die das Histogramm gezeigt werden soll

if (in_array($ext$AutorisedImageType)) {
   $histogramm_image "<img src='histo.php?hist_image=".$hist_image."&hist_file=".$hist_file."&hist_path=".$hist_path."' border=\"1\">";
} else {
   $histogramm_image REPLACE_EMPTY;
}

$site_template->register_vars(array(
   "histogramm" => "Histogramm:",
   "histogramm_image" => $histogramm_image
));
//--- Ende Histogramm 27.02.2006 ------------------------

?>


...und hier der Code der details.html

Code: [Select]
<?php
{if histogramm_image}                 
<tr>
<td valign="top" class="row1"><b>{histogramm}</b></td>
<td valign="top" class="row1">{histogramm_image}</td>
</tr>
{endif 
histogramm_image}
?>


Anmerkung: Die PHP-Markierung habe ich nur zur besseren farblichen Kennzeichnung hinzugefügt.

Vielleicht hat ja noch jemand ne Idee...  :)

Grüßle
Udo

2
Mods & Plugins (Requests & Discussions) / Re: [MOD] EXIF 0.1
« on: September 22, 2006, 11:51:05 AM »
Hi all,  :D

well, I think its still works...but to much information:

EXIF Info
FileType 2
MimeType image/jpeg
SectionsFound ANY_TAG, IFD0, THUMBNAIL, EXIF, INTEROP
COMPUTED Array
ImageDescription KONICA MINOLTA DIGITAL CAMERA
Make KONICA MINOLTA 
Model DYNAX 7D
Orientation 1
XResolution 720000/10000
YResolution 720000/10000
ResolutionUnit 2
Software Adobe Photoshop CS2 Windows
DateTime 2006:01:14 15:25:03
YCbCrPositioning 1
UndefinedTag:0xC4A5 PrintIM0300.€
Exif_IFD_Pointer 404
THUMBNAIL Array
ExposureTime 200/10
FNumber 80/10
ExposureProgram 1
ISOSpeedRatings 100
DateTimeOriginal 2006:01:13 17:17:18
DateTimeDigitized 2006:01:13 17:17:18
ComponentsConfiguration 
BrightnessValue 37/100
ExposureBiasValue 0/10
MaxApertureValue 400/100
MeteringMode 5
LightSource 0
Flash 16
FocalLength 240/10
SubjectLocation Array
UserComment 
FlashPixVersion 0100
ColorSpace 1
ExifImageWidth 659
ExifImageLength 800
InteroperabilityOffset 964
CustomRendered 0
ExposureMode 1
WhiteBalance 0
DigitalZoomRatio 0/1
FocalLengthIn35mmFilm 36
SceneCaptureType 0
GainControl 0
Contrast 0
Saturation 0
Sharpness 0
InterOperabilityIndex R98
InterOperabilityVersion 0100

or look at this pictures:
http://www.entscheidende-augenblicke.de/details.php?image_id=87

Can I change anythink, may be the information from english -> german
or this one
XResolution 720000/10000
YResolution 720000/10000

Thanks
Udo

3
Mods & Plugins (Releases & Support) / Re: [MOD] Histogram
« on: September 21, 2006, 09:13:45 PM »
Habe jetzt alles wieder ein und ausgebaut. Ich bin schon fast am verzeifeln. Warum zeigt er mir nichts an??  8O Wer könnte mir denn mal die details.html, die histo.php und die details.php von einer lauffähigen Seite zu mailen? Wie gesagt bei mir zeigt er nur den Text "Histogram" und ein kleines Viereck an.
Würde mich freuen über eine Antwort. Gut Udo, das ich nicht der einzige bin wo es nicht klappert.. :roll: :roll:

Ich hab fast den ganzen Tag damit verbracht, das Histogramm ans laufen zu bekommen - und?  weißes Blatt mit rotem Kreuz.... :thumbdown:
Keine Ahnung, was ich noch anstellen soll.... :cry: :cry: :cry:
Vielleicht hat ja wirklich jemand erbarmen und schickt uns seine Daten... :)

Udo

4
Mods & Plugins (Releases & Support) / Re: [MOD] Histogram
« on: September 21, 2006, 02:45:15 PM »
Hallo zusammen,

ich hab genau das gleiche Problem...
Beim Bearbeiten der "histo.php ist mir auch aufgefallen, der der Eintrag "$filepath" nicht vorhanden ist ...  :?:

Hängt es vielleicht damit zusammen?

Grüßle
Udo

Pages: [1]