load_library :file_chooser attr_reader :img ########### # Example usage of file_chooser (in this case image file chooser) # not sure this is exactly possible with vanilla processing. Here we # defer setting the size of the sketch, until we know the size of image. ########### def setup file_chooser do |fc| fc.look_feel "Nimbus" fc.set_filter "Image Files", [".png", ".jpg"] my_file = fc.display @img = load_image(my_file) size img.width, img.height end end def draw background img end
Experiments with ruby-processing (processing-2.2.1) and JRubyArt for processing-3.0
Friday, 23 August 2013
Image Viewer Ruby Processing
Here is a little sketch, exploring the possibility of using my file_chooser to create a neat little image viewer. I does not make too much sense on its own, but we can take a look at images in ruby-processing, and then possibly do something with them along the lines of exporting to a "pixelated" sketch to cfdg for example.
Labels:
filechooser,
image viewer,
ruby-processing
Subscribe to:
Post Comments (Atom)
Followers
Blog Archive
-
▼
2013
(94)
-
▼
August
(10)
- Simple pixellator using a cfdg end point
- The Gtk+ look and feel using openjdk
- Image Viewer Ruby Processing
- File Chooser Library For ruby-processing
- File Chooser in JRuby
- Ruby-processing-2.1.3 is released (features proces...
- Netbeans for ruby-processing
- Avoiding classpath conflict with jruby-complete
- Conways Game of Life in ruby-processing (featuring...
- Using MDArray in ruby-processing
-
▼
August
(10)
About Me
- monkstone
- I have developed JRubyArt and propane new versions of ruby-processing for JRuby-9.1.5.0 and processing-3.2.2
No comments:
Post a Comment