Skip to content

Commit 69f317c

Browse files
committed
moves Contain memuse from wikis to README
1 parent f574adf commit 69f317c

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

README.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## ruby-vips : A fast image processing extension for Ruby.
1+
# ruby-vips : A fast image processing extension for Ruby.
22

33
note: this fork aims to track the latest stable vips. There are no plans to
44
add more features, just to keep it working.
@@ -60,7 +60,7 @@ gem 'ruby-vips'
6060
ruby-vips has [rdoc documentation](http://rubyvips.holymonkey.com). Also
6161
see [Wiki page](https://github.com/jcupitt/ruby-vips/wiki)
6262

63-
## Example.
63+
## Examples
6464

6565
```ruby
6666
require 'rubygems'
@@ -96,7 +96,7 @@ Image.jpeg('mypic.jpg', :shrink_factor => 4).shrink(2).png('out.png')
9696
Image.new('mypic.jpg').shrink(2).write('out.png')
9797
```
9898

99-
## Longer example
99+
### Longer example
100100

101101
```ruby
102102

@@ -258,6 +258,23 @@ ARGV.each do |filename|
258258
end
259259
```
260260

261+
## Gotchas
262+
263+
### Contain memuse
264+
ruby-vips only finalises vips images on GC. In other words:
265+
266+
a = Image.new(filename)
267+
a = nil
268+
269+
will not release the resources associated with the image, you have to
270+
either request a GC explicitly, or wait for Ruby to GC for you. This can
271+
be a problem if you're processing many images.
272+
273+
ruby-vips uses a simple mark system to link images together. Instead, we
274+
should rely on vips8 to link images for us, then dropping
275+
276+
... finish
277+
261278
## Why use ruby-vips?
262279

263280
- It supports over 250 low-level image and color manipulation operations.

0 commit comments

Comments
 (0)