public
Description: Rails plugin for uploading images as resources, with support for resizing, text stamping, and other special effects.
Homepage: http://fleximage.rubyforge.org
Clone URL: git://github.com/Squeegy/fleximage.git
Search Repo:
Basic copy editing on README.rdoc
Vannoy (author)
Sat Apr 12 08:23:00 -0700 2008
commit  31c29bd5ac73482e0ef6f6545d734a6703e2d803
tree    9b6e6ec6c5ec73e08dfe1155f7e0e3dbfbc4e1bb
parent  d41db8ce93b78aa668f7a799e5f1de6eab2e2534
...
8
9
10
11
 
12
13
14
15
 
 
16
17
18
19
20
21
22
 
23
24
 
25
26
27
28
 
 
 
29
30
 
31
32
33
...
38
39
40
41
 
42
43
44
...
47
48
49
50
 
51
52
53
...
149
150
151
152
 
153
154
155
...
8
9
10
 
11
12
13
 
 
14
15
16
17
18
19
20
21
 
22
23
 
24
25
 
 
 
26
27
28
29
 
30
31
32
33
...
38
39
40
 
41
42
43
44
...
47
48
49
 
50
51
52
53
...
149
150
151
 
152
153
154
155
0
@@ -8,26 +8,26 @@
0
 
0
 === 1. Image Uploads
0
 
0
-In this post Rails 2, resource driven world, Fleximage believes that images should belong directly to a record. So you simply tell your model have to tell your model class to act as Fleximage, and your model effortlessly gains the ability to handle file uploads.
0
+In this post Rails 2, resource-driven world, Fleximage believes that images should belong directly to a record. So you simply tell your model class to act as Fleximage, and your model effortlessly gains the ability to handle file uploads.
0
 
0
 * Your model gains the ability to interface directly with a +file_field+ form, allowing uploads with zero extra controller or model code.
0
-* Accept uploads form a web address, pulling in the image form the internet and saving it locally.
0
-* Image presence validation with a customizable form field errors message.
0
+* Accept uploads from a web address, pulling in the image from the internet and saving it locally.
0
+* Image presence validation with customizable form field error messages.
0
 * Image format validation that will not allow the file to be uploaded unless RMagick can parse it into useable image data.
0
 * Image pre-processing to keep uploaded images under a certain size, or other on-upload image processing tasks.
0
 
0
 
0
 === 2. Image Rendering
0
 
0
-The other half of the problem comes from the need to send the uploaded images back to the web browser. Most of the time, you need to display the image in different sizes or formats in different places on your site. For example, a product image in a store may need a square thumbnail image, a medium image for its focus page, and a large image for an "enlarge this photo", popup.
0
+The other half of the problem comes from the need to send the uploaded images back to the web browser. Most of the time, you need to display the image in different sizes or formats in different places on your site. For example, a product image in a store may need a square thumbnail image, a medium image for its focus page, and a large image for an "enlarge this photo" popup.
0
 
0
-Fleximage uses a simple templating engine that allows you to re-render images exactly how you need them. Using the same "master image", many images can be rendered from the same source. You can even go beyond resizing; there is support for image overlays, text drawing, drop shadows, borders and more. The rendering engine is flexible and extensible to whatever your dynamic image needs are.
0
+Fleximage uses a simple templating engine that allows you to re-render images exactly how you need them. Using the same "master image," many images can be rendered from the same source. You can even go beyond resizing; there is support for image overlays, text drawing, drop shadows, borders and more. The rendering engine is flexible and extensible to whatever your dynamic image needs are.
0
 
0
-* Renderer implemented as template engine, which fits in perfectly with Rails 2 RESTful style format sensitive views.
0
-* Does not need to have everything resized on upload allowing your site layout the change later on, and all image will re-render themselves just right with your new rendering templates.
0
-* Support for special effects like text, image or logo overlays, borders, shadows.
0
+* Renderer implemented as template engine, which fits in perfectly with Rails 2 RESTful style format-sensitive views.
0
+* Does not need to have everything resized on upload allowing your site layout the change later on, and all images will re-render themselves just right with your new rendering templates.
0
+* Support for special effects like text, image or logo overlays, borders and shadows.
0
 * Extensible by adding image operator classes which allow for reusable snippets of direct RMagick code.
0
-* Require absolutely zero controller code.
0
+* Requires absolutely zero controller code.
0
 
0
 
0
 = Getting Started
0
@@ -38,7 +38,7 @@
0
 
0
   ./script/plugin install git://github.com/Squeegy/fleximage.git
0
 
0
-Otherwise, you have to do a manual install since Rails did not yet support git. Download this file:
0
+Otherwise, you have to do a manual install since Rails does not yet support git. Download this file:
0
 
0
 http://github.com/Squeegy/fleximage/tarball/master
0
 
0
@@ -47,7 +47,7 @@
0
 
0
 == 2. Activating your model
0
 
0
-You need to let your model know it should be Fleximage friendly. Lets say you have a model for photos.
0
+You need to let your model know it should be Fleximage-friendly. Lets say you have a model for photos.
0
   
0
   # app/models/photo.rb
0
   class Photo < ActiveRecord::Base
0
@@ -149,7 +149,7 @@
0
 
0
 Now it's time to actually create a template to render the image. This happens through a special view with a .+flexi+ extension. This view template will pull out the master image for you, and send it to the browser as binary data after your processing of it done.
0
 
0
-The filename of the template should look like this: <tt>action_name.jpg.flexi</tt>, where +action_name+ is the controller action that will render this view. The +jpg+ tells the controller to render this view when the +jpg+ format is asked for. The +flexi+ tells Rails to render this view with the Fleximage tempalte engine, rather than +erb+ or +builder+ or other template types.
0
+The filename of the template should look like this: <tt>action_name.jpg.flexi</tt>, where +action_name+ is the controller action that will render this view. The +jpg+ tells the controller to render this view when the +jpg+ format is asked for. The +flexi+ tells Rails to render this view with the Fleximage template engine, rather than +erb+, +builder+ or other template types.
0
 
0
 The syntax of the view is pure ruby, but to process the image the view needs to call +operate+ on the instance of your model.
0
 

Comments

    No one has commented yet.