Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change output format #16

Open
Joott opened this issue Nov 27, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@Joott
Copy link

commented Nov 27, 2018

I'm currently trying to encode a .ppm file lossless and getting the same file (.ppm) back when decoding. Somehow i always end up with a .png file in the end and have no idea how to change that.

I'm currently doing the encoding and decoding in F#.
This is an example of how the code looks like. I also tried changing the parameters, but the output fileformat didn't change. The picture i got in the last step was always a PNG, while the input was a PPM. I tried different PPM pictures (including the samples from the testfile).

let image = File.OpenRead @"filepath"
let enc = J2kImage.ToBytes(J2kImage.CreateEncodableSource(image2))
File.WriteAllBytes(@"filepath2", enc)

let dec = J2kImage.FromFile(@"filepath2")
let dec2 = dec.As()
dec2.Save(@"filepath3")

Thanks in advance for any help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.