redcap
redcap is a library for uploading images to Second Life. It costs L$10 per image uploaded. You can save some money during testing by using the Preview Grid (if available).
installation
To install redcap as a gem:
gem install slothbear-redcap --source http://gems.github.com
If you’d rather grab a couple files and give it a try, download the following files from github.com/slothbear/redcap/tree/master
bin/redcap
lib/redcap/uploader.rb
Amend this line in redcap to fit your installation and give it a try.
require "redcap/uploader"
usage
Upload a JPG:
redcap first_name last_name SL_password your_image.jpg
Upload a PNG to the preview grid:
redcap -g preview first_name last_name SL_password picture.png
Note you can upload any image format that your installation of ImageMagick can read.
release notes
All images are uploaded into the top level of your Inventory. [to be fixed for release 1.0.0]
Second Life requires the uploaded image dimensions to be powers of 2. If you’d like to re-size your image to its original aspect ratio, make use of Uploader::aspect_ratio. (see forthcoming LSL example)
installing ImageMagick and RMagick: rmagick.rubyforge.org/install-osx.html
When you install ImageMagick, make sure you include the jpeg2 variant:
sudo port install tiff -macosx imagemagick +q8 +gs +wmf +jpeg2
To make sure your ImageMagick can produce SL-compatible JPEG-2000 files, issue the following command:
identify -list format | grep JPC
The JPC line should include “rw-” indicating it can write files, like:
JPC* JPC rw- JPEG-2000 Code Stream Syntax
The /tests were developed for a previous release and do not run at this time.
copyright
redcap – library for uploading files to Second Life Copyright 2009 Paul Morganthall
redcap is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <www.gnu.org/licenses/>.