https://github.com/red-data-tools/red-datasets-gdk-pixbuf
A Red Datasets plugin to export dataset as GdkPixbuf::Pixbuf object
https://github.com/red-data-tools/red-datasets-gdk-pixbuf
Last synced: about 1 year ago
JSON representation
A Red Datasets plugin to export dataset as GdkPixbuf::Pixbuf object
- Host: GitHub
- URL: https://github.com/red-data-tools/red-datasets-gdk-pixbuf
- Owner: red-data-tools
- License: mit
- Created: 2018-05-06T07:52:47.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-11-30T21:20:00.000Z (over 7 years ago)
- Last Synced: 2025-04-13T20:15:01.077Z (about 1 year ago)
- Language: Ruby
- Size: 20.5 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# README
## Name
Red Datasets GDK Pixbuf
## Description
Red Datasets GDK Pixbuf adds [GDK Pixbuf](https://developer.gnome.org/gdk-pixbuf/stable/) object export feature to Red Datasets.
Red Datasets GDK Pixbuf adds `#to_gdk_pixbuf` method to some datasets in Red Datasets. You can get `GdkPixbuf::Pixbuf` objects from a dataset.
## Install
```console
% gem install red-datasets-gdk-pixbuf
```
## Usage
Here is an example to get images for CIFAR dataset by `#to_gdk_pixbuf`:
```ruby
require "datasets"
cifar = Datasets::CIFAR.new
cifar.each.with_index do |record, i|
pixbuf = record.to_gdk_pixbuf
pixbuf.save("#{record.label}-#{i}.png")
end
```
## License
The MIT license. See `LICENSE.txt` for details.