Location: PHPKode > scripts > Image2Char > image2char/docs/Using_Image2HTML_class.htm
<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 11">
<meta name=Originator content="Microsoft Word 11">
<link rel=File-List href="Using%20Image2HTML%20class_arquivos/filelist.xml">
<title>Using Image2HTML class</title>
<!--[if gte mso 9]><xml>
 <o:DocumentProperties>
  <o:Author>Websul</o:Author>
  <o:LastAuthor>Websul</o:LastAuthor>
  <o:Revision>2</o:Revision>
  <o:TotalTime>13</o:TotalTime>
  <o:Created>2007-05-19T14:25:00Z</o:Created>
  <o:LastSaved>2007-05-19T14:25:00Z</o:LastSaved>
  <o:Pages>1</o:Pages>
  <o:Words>109</o:Words>
  <o:Characters>591</o:Characters>
  <o:Company>Websul</o:Company>
  <o:Lines>4</o:Lines>
  <o:Paragraphs>1</o:Paragraphs>
  <o:CharactersWithSpaces>699</o:CharactersWithSpaces>
  <o:Version>11.5606</o:Version>
 </o:DocumentProperties>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:SpellingState>Clean</w:SpellingState>
  <w:GrammarState>Clean</w:GrammarState>
  <w:HyphenationZone>21</w:HyphenationZone>
  <w:PunctuationKerning/>
  <w:ValidateAgainstSchemas/>
  <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
  <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
  <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
  <w:Compatibility>
   <w:BreakWrappedTables/>
   <w:SnapToGridInCell/>
   <w:WrapTextWithPunct/>
   <w:UseAsianBreakRules/>
   <w:DontGrowAutofit/>
  </w:Compatibility>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:LatentStyles DefLockedState="false" LatentStyleCount="156">
 </w:LatentStyles>
</xml><![endif]-->
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-parent:"";
	margin:0cm;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:"Times New Roman";}
h1
	{mso-style-next:Normal;
	margin-top:12.0pt;
	margin-right:0cm;
	margin-bottom:3.0pt;
	margin-left:0cm;
	mso-pagination:widow-orphan;
	page-break-after:avoid;
	mso-outline-level:1;
	font-size:16.0pt;
	font-family:Arial;
	mso-font-kerning:16.0pt;}
h2
	{mso-style-next:Normal;
	margin-top:12.0pt;
	margin-right:0cm;
	margin-bottom:3.0pt;
	margin-left:0cm;
	mso-pagination:widow-orphan;
	page-break-after:avoid;
	mso-outline-level:2;
	font-size:14.0pt;
	font-family:Arial;
	font-style:italic;}
code
	{font-family:"Courier New";
	mso-ascii-font-family:"Courier New";
	mso-fareast-font-family:"Times New Roman";
	mso-hansi-font-family:"Courier New";
	mso-bidi-font-family:"Courier New";}
span.SpellE
	{mso-style-name:"";
	mso-spl-e:yes;}
span.GramE
	{mso-style-name:"";
	mso-gram-e:yes;}
@page Section1
	{size:595.3pt 841.9pt;
	margin:70.85pt 3.0cm 70.85pt 3.0cm;
	mso-header-margin:35.4pt;
	mso-footer-margin:35.4pt;
	mso-paper-source:0;}
div.Section1
	{page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
 /* Style Definitions */
 table.MsoNormalTable
	{mso-style-name:"Tabela normal";
	mso-tstyle-rowband-size:0;
	mso-tstyle-colband-size:0;
	mso-style-noshow:yes;
	mso-style-parent:"";
	mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
	mso-para-margin:0cm;
	mso-para-margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:10.0pt;
	font-family:"Times New Roman";
	mso-ansi-language:#0400;
	mso-fareast-language:#0400;
	mso-bidi-language:#0400;}
</style>
<![endif]-->
</head>

<body lang=PT-BR style='tab-interval:35.4pt'>

<div class=Section1>

<h1><span class=SpellE>Using</span> Image2HTML <span class=SpellE>class</span></h1>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal><span style='mso-tab-count:1'>            </span>Image2HTML
is a <span class=SpellE>class</span> <span class=SpellE>that</span> <span
class=SpellE>converts</span> <span class=SpellE>most</span> <span class=SpellE>common</span>
<span class=SpellE>image</span> <span class=SpellE>formats</span> (JPG, JPEG,
GIF e PNG) <span class=SpellE>into</span> <span class=SpellE>an</span> HTML <span
class=SpellE>chars</span> art. Use <span class=SpellE>this</span> <span
class=SpellE>class</span> is <span class=SpellE>very</span> <span class=SpellE>easy</span>.
<span class=SpellE>Simply</span> <span class=SpellE>follow</span> <span
class=SpellE>these</span> <span class=SpellE>steps</span>:</p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<h2>1. <span class=SpellE>Include</span> <span class=SpellE>the</span> <span
class=SpellE>class</span> file</h2>

<p class=MsoNormal><span style='mso-tab-count:1'>            </span><span
class=SpellE>Place</span> <span class=SpellE>on</span> <span class=SpellE>begin</span>
<span class=SpellE>of</span> <span class=SpellE>your</span> file: </p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal><span class=SpellE><span class=GramE>include</span></span>
('image2html.<span class=SpellE>class</span>.<span class=SpellE>php</span>');</p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<h2>2. <span class=SpellE>Create</span> <span class=SpellE>the</span> <span
class=SpellE>class</span> <span class=SpellE>instance</span></h2>

<p class=MsoNormal><span style='mso-tab-count:1'>            </span><span
class=SpellE>Place</span> <span class=SpellE>after</span> <span class=SpellE>class</span>
<span class=SpellE>inclusion</span>: </p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>$<span class=SpellE>image</span><span style='mso-tab-count:
1'> </span> = new Image2HTML('<span class=SpellE>path</span>/to/<span
class=SpellE>your</span>/<span class=SpellE>image.jpg</span>');</p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal><span style='mso-tab-count:1'>            </span><span
class=SpellE>Where</span> <span class=SpellE>path</span>/to/<span class=SpellE>your</span>/<span
class=SpellE>image.jpg</span> is <span class=SpellE>the</span> <span
class=SpellE>path</span> to <span class=SpellE>your</span> <span class=SpellE>image</span>.</p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<h2>3. Set <span class=SpellE>chars</span></h2>

<p class=MsoNormal><span style='mso-tab-count:1'>            </span>Set <span
class=SpellE>the</span> <span class=SpellE>chars</span> <span class=SpellE>that</span>
<span class=SpellE>will</span> <span class=SpellE>compose</span> <span
class=SpellE>your</span> <span class=SpellE>art</span>: </p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>$<span class=SpellE>image</span>-&gt;<span class=SpellE>chars</span>
= 'USETHISCHARS';</p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal><span style='mso-tab-count:1'>            </span><span
class=SpellE>Where</span> USETHISCHARS are <span class=SpellE>the</span> <span
class=SpellE>chars</span> <span class=SpellE>that</span> <span class=SpellE>you</span>
<span class=SpellE>can</span> <span class=SpellE>change</span>.</p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<h2>4. <span class=SpellE>Finnally</span>, show <span class=SpellE><span
class=GramE>art</span></span></h2>

<p class=MsoNormal><span style='mso-tab-count:1'>            </span><span
class=SpellE>Place</span> <span class=SpellE>where</span> <span class=SpellE>you</span>
<span class=SpellE>want</span> to show <span class=SpellE>the</span> <span
class=SpellE>art</span>: </p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>$<span class=SpellE>image</span>-&gt;<span class=GramE>Show(</span>);</p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal><span class=GramE>It’</span>s <span class=SpellE>All</span> <span
class=SpellE>Folks</span></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

</body>

</html>
Return current item: Image2Char