https://github.com/liftmodules/imaging
Lift module providing image processing utilities
https://github.com/liftmodules/imaging
liftmodules
Last synced: 4 months ago
JSON representation
Lift module providing image processing utilities
- Host: GitHub
- URL: https://github.com/liftmodules/imaging
- Owner: liftmodules
- Created: 2012-05-27T12:46:39.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2018-07-21T20:59:53.000Z (almost 8 years ago)
- Last Synced: 2024-03-26T13:24:38.029Z (about 2 years ago)
- Topics: liftmodules
- Language: Scala
- Size: 1.55 MB
- Stars: 1
- Watchers: 25
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Imaging Lift Module
[](https://travis-ci.org/liftmodules/imaging)
This module provides image-related utilities.
## Installation
To include this module in your Lift project, add the following to `build.sbt`:
libraryDependencies += "net.liftmodules" %% "imaging_3.2" % "1.6.0"
## Previous Releases
| Lift Version | Scala Version | Module Version |
|--------------|---------------|----------------|
| 3.2.x | 2.12, 2.11 | 1.6.0 |
| 3.1.x | 2.12, 2.11 | 1.5.0 |
| 3.0.x | 2.12, 2.11 | 1.4.0 |
| 2.6.x | 2.10, 2.9 | 1.3 |
| 2.5.x | 2.10, 2.9 | 1.2 |
#### Historic Snapshots
| Lift Version | Scala Version | Module Version |
|--------------|---------------|----------------|
| 3.0.x | 2.11 | 1.4-SNAPSHOT |
| 2.6.x | 2.11, 2.10 | 1.4-SNAPSHOT |
## Usage
**Note:** The module package changed from `net.liftweb.imaging` to `net.liftmodules.imaging` in May 2012. Please consider this when referencing documentation written before that date.
### From Stream to BufferedImage
var metaImage = ImageResizer.getImageFromStream(fph.fileStream)
### Remove alpha channel (Fix Transparency from PNG)
var metaImage = ImageResizer.removeAlphaChannel(metaImage)
### Resize and rotate image
val img = ImageResizer.max(metaImage.orientation, metaImage.image, 800, 600)
### Warning JPEG codec
OpenJDK does not have a native JPEG encoder, try using Sun's JDK, or using an external library like JAI.
## Notes for module developers
Merge to master will trigger a Travis build and publish a SNAPSHOT (if the version is a -SNAPSHOT).