Location: PHPKode > scripts > Thumbnailer > thumbnailer/thumbnailer-apidoc.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html lang="en">
<head>

<meta name="generator" content="PHPDoctor 2 alpha (http://phpdoctor.sourceforge.net/)">
<meta name="when" content="Tue, 24 May 2005 22:29:15 +0200">

<style type="text/css">

* {
    margin: 0;
    padding: 0;
}

body {
	font-family: "Times New Roman", Times, serif;
	margin: 0px;
	padding: 10px;
	font-size: 100%;
    background-color: #fff;
    color: #000;
}

a {
    color: #00f;
}

a:visited {
    color: #518;
}

table {
    width: 100%;
    margin: 10px 0;
    border-collapse: collapse;
}

table, th, td {
    border: 2px solid #999;
}

th {
    padding: 2px;
    background-color: #ccf;
    text-align: left;
    font-size: 140%;
}

td {
    padding: 2px;
}

hr, p, dl, ul, ol, h1, h2, h3, h4, h5, h6 {
    margin: 10px 0;
}

dt {
    font-weight: bold;
}

dd {
    margin-left: 40px;
}

ul, ol {
    margin-left: 30px;
}

p {
    margin-left: 10px;
}

h1 {
    font-size: 140%;
    font-family: Arial, Helvetica, sans-serif;
}

h2 {
    font-size: 120%;
    font-family: Arial, Helvetica, sans-serif;
}

/* page header */

div.header {
    width: 100%;
    font-family: Arial, Helvetica, sans-serif;
    background-color: #eef;
    margin: 0 0 10px;
    padding: 4px 0;
}

div.header h1 {
    float: right;
    font-size: 100%;
    font-style: italic;
    padding: 0 4px;
    margin: 0;
}

div.header ul {
    list-style: none;
    margin: 0;
}

div.header ul li {
    display: inline;
    font-size: 100%;
    font-weight: bold;
    padding: 0 4px;
}

div.header ul li.active {
    background-color: #00008c;
    color: #fff;
}

div.header ul li a:visited {
    color: #000;
}

/* small links */

div.small_links {
    text-transform: uppercase;
    font-size: 65%;
    font-family: Arial, Helvetica, sans-serif;
    margin: 8px;
}

/* footer */

p#footer {
	font-size: 80%;
}

/* frames */

#frame h1 {
    font-size: 120%;
}

#frame h2 {
    font-size: 100%;
}

#frame ul {
    list-style: none;
    margin-left: 10px;
}

#frame li {
    font-style: italic;
}

/* definition writer */

div.qualifiedName {
    font-size: 80%;
    font-weight: bold;
    margin: 10px 0 0;
}

#definition h1 {
    margin: 0 0 10px;
    font-family: "Times New Roman", Times, serif;
}

#definition h2 {
    border: 2px solid #999;
    padding: 2px;
    background-color: #ccf;
    text-align: left;
    font-size: 140%;
    font-family: "Times New Roman", Times, serif;
}

pre.tree {
    margin: 10px 0;
}

table.inherit th {
    background-color: #eef;
    font-size: 120%;
}

code.signature {
    display: block;
    margin: 10px 0;
}

div.details {
    margin: 10px 0 10px 20px;
}

/* tree */

#tree ul ul {
    margin-top: 0;
    margin-bottom: 0;
}

</style>



<title>thumbnailer (Thumbnailer APIDoc)</title>

</head>
<body id="definition" onload="parent.document.title=document.title;">

<div class="small_links">
Summary: <a href="#summary_field">Field</a> | <a href="#summary_method">Method</a> | <a href="#summary_constr">Constr</a>
Detail: <a href="#detail_field">Field</a> | <a href="#detail_method">Method</a> | <a href="#summary_constr">Constr</a>
</div>
<hr>

<h1>Class thumbnailer</h1>

<pre class="tree"><strong>thumbnailer</strong><br /></pre>

<hr>

<p>public  class <strong>thumbnailer</strong></p>

<div class="comment" id="overview_description">
Version:       0.1<br />
Author:        Pascal Rehfeldt <hide@address.com><br />
Last modified: 24 May 2005<br />
Copyright (C): 2005 Pascal Rehfeldt, all rights reserved<br />
<br />
Description:<br />
Creating Thumbnails from different sources.</div>

<hr>

<table id="summary_constr">
<tr><th colspan="2">Constructor Summary</th></tr>
<tr>
<td class="description"><p class="name"><a href="#thumbnailer">thumbnailer</a>(string image, string tempdir, string strategie, integer x, integer y, string ImageMagickConvert)</p><p class="description">Constructor</p></td>
</tr>
</table>

<table id="summary_method">
<tr><th colspan="2">Method Summary</th></tr>
<tr>
<td class="type">private  void</td>
<td class="description"><p class="name"><a href="#createThumbnail">createThumbnail</a>()</p><p class="description">Depending on the strategie, the thumbnail will be created</p></td>
</tr>
<tr>
<td class="type"> void</td>
<td class="description"><p class="name"><a href="#getErrorMsg">getErrorMsg</a>()</p><p class="description">Return an array of occured errors</p></td>
</tr>
<tr>
<td class="type">private  string</td>
<td class="description"><p class="name"><a href="#getExifThumbnail">getExifThumbnail</a>()</p><p class="description">Strategie exif: getting the thumbnail from EXIF-Metadata</p></td>
</tr>
<tr>
<td class="type">private  string</td>
<td class="description"><p class="name"><a href="#getGDThumbnail">getGDThumbnail</a>()</p><p class="description">Strategie gd: creates the thumbnail using the GD-Lib</p></td>
</tr>
<tr>
<td class="type"> void</td>
<td class="description"><p class="name"><a href="#getImageError">getImageError</a>()</p><p class="description">Outputs the occuered errors as an image</p></td>
</tr>
<tr>
<td class="type">private  string</td>
<td class="description"><p class="name"><a href="#getImageMagickThumbnail">getImageMagickThumbnail</a>()</p><p class="description">Strategie im: creating the thumbnail using ImageMagick</p></td>
</tr>
<tr>
<td class="type">private  string</td>
<td class="description"><p class="name"><a href="#getImageType">getImageType</a>()</p><p class="description">Returns the mimetype of the image
JPEG or PNG</p></td>
</tr>
<tr>
<td class="type"> string</td>
<td class="description"><p class="name"><a href="#getThumbnail">getThumbnail</a>()</p><p class="description">Returns the thumbnail to the user</p></td>
</tr>
<tr>
<td class="type"> void</td>
<td class="description"><p class="name"><a href="#saveThumbnail">saveThumbnail</a>(string filename)</p><p class="description">Saves the created thumbnail on the server</p></td>
</tr>
<tr>
<td class="type"> void</td>
<td class="description"><p class="name"><a href="#showThumbnail">showThumbnail</a>()</p><p class="description">Writes the image to the outbuffer (browser)</p></td>
</tr>
</table>

<h2 id="detail_constr">Constructor Detail</h2>
<h3 id="thumbnailer">thumbnailer</h3>
<code class="signature">public <strong>thumbnailer</strong>(string image, string tempdir, string strategie, integer x, integer y, string ImageMagickConvert)</code>
<div class="details">
Constructor<dl>
<dt>Parameters:</dt>
<dd>image - Image to create thumbnail from</dd>
<dd>tempdir - Temporary directory</dd>
<dd>strategie - How to genereate the tumbnail</dd>
<dd>x - X size of the thumbnail</dd>
<dd>y - Y size of the thumbnail</dd>
<dd>ImageMagickConvert - Convert command from ImageMagick</dd>
</dl>
</div>

<hr>

<h2 id="detail_method">Method Detail</h2>
<h3 id="createThumbnail">createThumbnail</h3>
<code class="signature">private  void <strong>createThumbnail</strong>()</code>
<div class="details">
Depending on the strategie, the thumbnail will be created</div>

<hr>

<h3 id="getErrorMsg">getErrorMsg</h3>
<code class="signature">public  void <strong>getErrorMsg</strong>()</code>
<div class="details">
Return an array of occured errors</div>

<hr>

<h3 id="getExifThumbnail">getExifThumbnail</h3>
<code class="signature">private  string <strong>getExifThumbnail</strong>()</code>
<div class="details">
Strategie exif: getting the thumbnail from EXIF-Metadata<dl>
<dt>Returns:</dt>
<dd>The created thumbnail</dd>
</dl>
</div>

<hr>

<h3 id="getGDThumbnail">getGDThumbnail</h3>
<code class="signature">private  string <strong>getGDThumbnail</strong>()</code>
<div class="details">
Strategie gd: creates the thumbnail using the GD-Lib<dl>
<dt>Returns:</dt>
<dd>The created thumbnail</dd>
</dl>
</div>

<hr>

<h3 id="getImageError">getImageError</h3>
<code class="signature">public  void <strong>getImageError</strong>()</code>
<div class="details">
Outputs the occuered errors as an image</div>

<hr>

<h3 id="getImageMagickThumbnail">getImageMagickThumbnail</h3>
<code class="signature">private  string <strong>getImageMagickThumbnail</strong>()</code>
<div class="details">
Strategie im: creating the thumbnail using ImageMagick<dl>
<dt>Returns:</dt>
<dd>The created thumbnail</dd>
</dl>
</div>

<hr>

<h3 id="getImageType">getImageType</h3>
<code class="signature">private  string <strong>getImageType</strong>()</code>
<div class="details">
Returns the mimetype of the image
JPEG or PNG<dl>
<dt>Returns:</dt>
<dd>Imagetype</dd>
</dl>
</div>

<hr>

<h3 id="getThumbnail">getThumbnail</h3>
<code class="signature">public  string <strong>getThumbnail</strong>()</code>
<div class="details">
Returns the thumbnail to the user<dl>
<dt>Returns:</dt>
<dd>created thumbnail</dd>
</dl>
</div>

<hr>

<h3 id="saveThumbnail">saveThumbnail</h3>
<code class="signature">public  void <strong>saveThumbnail</strong>(string filename)</code>
<div class="details">
Saves the created thumbnail on the server<dl>
<dt>Parameters:</dt>
<dd>filename - Name where the file should be stored</dd>
</dl>
</div>

<hr>

<h3 id="showThumbnail">showThumbnail</h3>
<code class="signature">public  void <strong>showThumbnail</strong>()</code>
<div class="details">
Writes the image to the outbuffer (browser)</div>

<hr>


<div class="small_links">
Summary: <a href="#summary_field">Field</a> | <a href="#summary_method">Method</a> | <a href="#summary_constr">Constr</a>
Detail: <a href="#detail_field">Field</a> | <a href="#detail_method">Method</a> | <a href="#summary_constr">Constr</a>
</div>
<hr>

<p id="footer">This document was generated by <a href="http://phpdoctor.sourceforge.net/">PHPDoctor: The PHP Documentation Creator</a></p>

</body>

</html>
Return current item: Thumbnailer