Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
= FreeImage Ruby Bindings
== Overview The free-image gem provides Ruby language bindings for the FreeImage[http://freeimage.sourceforge.net/] library. It is free software, released under the MIT License.
FreeImage is an light-weight, open source image manipulation library that supports many popular graphics image {formats}[rdoc-ref:FreeImage.formats] such as PNG, JPEG, GIF, BMP, and TIFF.
We think FreeImage is a great library for applications that need to read, write, create and modify images and thumbnails because:
Note that FreeImage is not the right library for you if you need:
== Installation free-image requires FreeImage version 3.10 or higher and Ruby 1.8.7 or higher. The easiest way to install free-image is via Ruby Gems. To install:
gem install free-image
== Getting Started Getting started is easy - first work through the examples in the {cookbook}[http://cfis.github.io/free-image-ruby/]. Once you've done that, the refer to rdocs for extensive documentation.
== Memory Management Opening and working with images consumes some memory. Generally you won't have to worry about this. When an image goes out of scope, it will be garbage collected and the underlying image memory will be freed.
Having said that, \FreeImage also lets you control when the memory is freed. Any method that creates a new image also takes a block. When the block finishes, the underlying image memory is freed. This works the same way as the File.open method. For example:
FreeImage::Bitmap.open('images/lena.png') do |image| thumbnail = image.make_thumbail do |thumbail| thumbnail.save('images/thumbnail.png', :png) end end
When the inner block finishes the thumbnail image is freed and when the outer block finished the lena image is freed.
If you need even more control, you can use FreeImage::Bitmap#free which frees the underlying image. Be careful though - once the image is freed further usage of it will result in a segmentation fault.
== Implementation Status The FreeImage API is divided into multiple parts. As summarized below, the Ruby ffi bindings currently implement a subset of the available api. Patches are welcome to extend the coverage.
=== Bitmap functions
=== Metadata Functions
=== Toolkit Functions
== Documentation Documentation is available via rdoc, and is installed automatically with the gem. Note that much of the documentation is directly copied from the FreeImage API documentation available here[http://downloads.sourceforge.net/freeimage/FreeImage3151.pdf].
free-image's online documentation is generated using Hanna. To generate documentation from source:
gem install hanna-nouveau rake rdoc
== Support
If you have any questions about using free-image, please ?
== License See LICENSE for license information.
FAQs
Unknown package
We found that free-image demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.