cookbook.rdoc in free-image-0.5.0 vs cookbook.rdoc in free-image-0.6.0
- old
+ new
@@ -15,20 +15,19 @@
image = FreeImage::Bitmap.open(FreeImage::Memory.new(string))
The open method also takes two additional optional parameters, format and flags,
that provide greater control over opening images if needed.
-The open method works similary to File.open, meaning you can pass it a block.
+The open method works similary to File.open, meaning you can also pass it a block.
FreeImage::Bitmap.open('images/lena.png') do |image|
... do some stuff..
end
Once the block completes, the image will be automatically freed for you. If you don't
pass block, then the image will be freed by Ruby's Garbage Collector once it goes out
-of scope or you can call the FreeImage::Bitmap#free method. Once you do that though,
-remember the image no longer exists and further usage of it will result in
-segmentation faults.
+of scope. For more information about memory management, refer to
+the readme [rdoc-ref:README.rdoc].
Image[link:cookbook/lena.png]
== Saving An Image
Now let's say you want to save the image to :png format. This is done
\ No newline at end of file