You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: