Comments (9)
See imagepipe and chimper for practical uses of the library:
https://github.com/pedrocr/imagepipe/
https://github.com/pedrocr/chimper
from rawloader.
More than welcome. If you want to discuss anything live I have IRC always running on #chimper irc.freenode.net. I may not always be available but I'll eventually reply, and check it often.
from rawloader.
Does this library have any support for conversion operations? Such as CR2 -> JPG?
from rawloader.
@aaronleopold rawloader
only deals with interpreting and decoding the raw data itself, it doesn't process it in any way. imagepipe
is what you want if you want to create an RGB image as that requires a raw processing pipeline to convert the raw data into RGB output with proper demosaic, white balance, levels, etc. You can then write that image out to a jpeg. The converter binary in imagepipe includes a full JPG output from any raw file that you can use as a guide:
This just uses the default values for the operations. imagepipe
operations have options that can be set to use different whitebalance, color conversion, crop, rotate, etc.
Documenting imagepipe a bit more would be a good first issue. I'll put that in that project.
from rawloader.
@pedrocr Thank you so much for the detailed reply!! I'll look at the linked file for reference!
from rawloader.
It is possible to use this library to extend extension number supported byimage-rs
?
I can't find anywhere example how to decode image in this library and results pass to image-rs.
from rawloader.
@qarmin see my comment above with the link to imagepipe. That converter example uses the image crate and so does chimper.
from rawloader.
Well, if I read this correctly, then decoded image from rawloader is not used in any other place, so still I don't know how to use this
https://github.com/pedrocr/imagepipe/blob/d95a17f7a55c7d6fb73d8006791a9436e80de10c/src/bin/converter.rs#L36-L39
if file_entry.path.to_string_lossy().ends_with(".cr2"){
let raw_image = match rawloader::decode_file(&file_entry.path){
Ok(t) => t,
Err(e) => {
println!("Failed to process image {:?}, reason {}", file_entry.path,e);
return Some(Some((file_entry,Vec::new())));
}
};
raw_image.
match raw_image.data{
RawImageData::Integer(vec_16) => {
vec_16.u
}
RawImageData::Float(vec_32) => {
}
}
// image = image::load_from_memory(raw_image.data);
}
For now I wrote this code, but I don't know how to convert vec_16 or vec_32 to &[u8] needed by load_from_memory
and I'm not sure if it will work.
from rawloader.
That part is only used to print out some metadata. The actual decode and conversion is just this call:
It gives you an 8bit output directly no matter what the internal pipeline needed to do to achieve that.
That can then be used with the image crate:
That's the simplest API. If you want to change settings then you need to actually setup a pipeline:
and then you can alter the conversion settings of the pipeline, by writing to pipeline.ops.*
. The pipeline also has a 16bit output option which is useful if you want to use an 16bit format with the image crate.
from rawloader.
Related Issues (20)
- Access blackarea values HOT 2
- Duplicate camera files for rebel line HOT 1
- Official and localized models HOT 1
- CR3 support HOT 8
- Expose ljpeg decoder HOT 1
- Implement std::error::Error for errors HOT 3
- Official IRC channel for project discussion HOT 3
- Fix clippy warnings HOT 4
- Thanks for this! HOT 3
- Panic on D3400 decode HOT 5
- Tile or Scanline loading support HOT 6
- Shutter speed, ISO and aperture HOT 10
- Some images with ambiguous orientation data are not rotated correctly
- Advice/Documentation for final brightness HOT 3
- Demosaicing Bits in example from README.md HOT 1
- Error: "Couldn't find tag Tag::Make" HOT 2
- Apple proraw DNG support
- random tile decoding problems HOT 1
- will this project keep going? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rawloader.