==============
===EARender===
==============


===============
==What is it?==
===============
EARender is a Windows renderer for EAC codefiles (usually generated by EACoder).

===============
==Is it free?==
===============
Yes, EARender is completely free. You can use it for any purpose, including 
commercial use. You can also distribute it freely, provided you distribute 
legal.txt and this file (readme.txt) unchanged with it.

====================
==How do I use it?==
====================
If you're reading this file, that probably means you've already unzipped 
the files. If not, unzip them into a folder wherever you want EARender.

Run install.bat. This simply copies bmp2png.exe into your Windows folder, 
assuming that you have Windows installed on C: or D: drive.
Once you've run install.txt, EARender should be fully functional.

To render, simply drag and drop an EAC file onto earender.exe. 
You can also associate .eac files with earender.exe if you like, in which 
case you can simply double-click any EAC file to render.

To render at higher resolutions, edit the EAC file itself. If you're not 
sure how to do that, email me (patty@pheddles.com) and I'll write a 
guide for that.

To uninstall, simply remove bmp2png.exe from your Windows folder and remove 
your EARender folder (including everything in it). The uninstall.bat file 
provided will remove bmp2png.exe from your Windows folder.

=====================
==How does it work?==
=====================
EARender is a stripped-down version of EACoder - I literally took the code 
from EACoder, took out the bits I didn't need, and adapted what was left.

EARender, like EACoder, is written in PHP. In order to run without a web 
server, I compiled it with phc-win (www.swiftlytilting.com/category/phc-win/).

EACoder renders to an image in memory and then uses PHP's imagepng() function 
to write to disk. For large renders, this uses large amounts of memory. Since 
EARender is intended for large renders, it renders directly to disk (thereby 
avoiding the problem). Unfortunately, this means that PHP's png compresssion 
(which only works on an image in memory) isn't available. Instead, EARender 
writes a Windows bitmap file (one line at a time) as it renders. EARender then 
calls bmp2png (http://pmt.sourceforge.net/bmp2png/index.html) to compress the 
rendered image file to png.

=============================================================================
==How do I make EARender display render status more or less than 100 times?==
=============================================================================
Yikes, long question.
In your setup code, set $divisor_ to the number of updates you want during a 
render. This is the internal variable (default 100) which controls render 
status updates. Similarly, $row_width_ (default 20) determines the number of 
updates shown per line.
Note: The variable names end with an underscore. Without the underscore, they 
won't work. The underscores are there to avoid interfering with variables in 
user code.
Note also: Status updates are only ever printed at the end of a row of pixels;
for an image of height N pixels, the maximum number of updates shown is N.

===========
==Credits==
===========
Patrick Heddles
	-EACoder
	-.eac file format
	-EARender

The PHP Group (http://www.php.net)
	-PHP: Hypertext Preprocessor (the language)
	-PHP interpreter

MIYASAKA Masaru (alkaid@coral.ocn.ne.jp)
	-bmp2png

SwiftlyTilting (http://swiftlytilting.com - actual name unknown)
	-phc-win

=========
==Legal==
=========
This program is provided under the GNU Public Licence v3.0

===========
==Warning==
===========
EARender, like EACoder, works by executing user-supplied code. EACoder checks the user-
supplied code and refuses to run code it thinks is malicious. This sometimes interferes 
with legitimate code, but is necessary for the web application. EARender, which runs on 
the user's own computer, does not check its input for malicious code. This means that 
a malicious .eac file could, if rendered by EARender, do bad things to your computer. 
Do not run .eac files from non-trusted sources unless you read and understand the code.
