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

No Tiff support. #12

Open
JimBobSquarePants opened this Issue Oct 30, 2016 · 14 comments

Comments

Projects
None yet
6 participants
@JimBobSquarePants
Member

JimBobSquarePants commented Oct 30, 2016

@JimBobSquarePants

This comment has been minimized.

Show comment
Hide comment
@JimBobSquarePants

JimBobSquarePants Oct 30, 2016

Member

From @kierenj on September 7, 2016 20:27

I realise how unhelpful this comment right here is, but TIFF decoding across the board can be really tricky to get right - there are loads of compression formats, and even fairly respected tools (from MS / Atalasoft) get it wrong even with 1-bit images. I think some archiving formats even require special licensing to implement correctly. It might be worth identifying a small subset of formats to support!

Member

JimBobSquarePants commented Oct 30, 2016

From @kierenj on September 7, 2016 20:27

I realise how unhelpful this comment right here is, but TIFF decoding across the board can be really tricky to get right - there are loads of compression formats, and even fairly respected tools (from MS / Atalasoft) get it wrong even with 1-bit images. I think some archiving formats even require special licensing to implement correctly. It might be worth identifying a small subset of formats to support!

@JimBobSquarePants

This comment has been minimized.

Show comment
Hide comment
@JimBobSquarePants

JimBobSquarePants Oct 30, 2016

Member

@kierenj It's certainly not an unhelpful comment. Tiff would be hard and I'm sorely tempted to let someone else figure it out and concentrate on what we have already. I'm just dreading the day someone tells me that the library is useless without it. There's always someone!

Member

JimBobSquarePants commented Oct 30, 2016

@kierenj It's certainly not an unhelpful comment. Tiff would be hard and I'm sorely tempted to let someone else figure it out and concentrate on what we have already. I'm just dreading the day someone tells me that the library is useless without it. There's always someone!

@ChrisVanDijk

This comment has been minimized.

Show comment
Hide comment
@ChrisVanDijk

ChrisVanDijk Feb 22, 2017

I needed to import Tiff files so I created a temporary Tiff encoder and decoder based on LibTiff.Net.

ChrisVanDijk commented Feb 22, 2017

I needed to import Tiff files so I created a temporary Tiff encoder and decoder based on LibTiff.Net.

@JimBobSquarePants

This comment has been minimized.

Show comment
Hide comment
@JimBobSquarePants

JimBobSquarePants Feb 22, 2017

Member

@ChrisVanDijk Good effort but have you benchmarked that codec? The Bitmiracle jpeg codec was about 10x slower and used 190MB more to process a small test image compared to our codec. I imagine the Tiff one will be the same. I'd be careful using it.

@Andy-Wilkinson you have been playing around with Tiff haven't you with your own stuff? I wonder if we can use some of it?

Member

JimBobSquarePants commented Feb 22, 2017

@ChrisVanDijk Good effort but have you benchmarked that codec? The Bitmiracle jpeg codec was about 10x slower and used 190MB more to process a small test image compared to our codec. I imagine the Tiff one will be the same. I'd be careful using it.

@Andy-Wilkinson you have been playing around with Tiff haven't you with your own stuff? I wonder if we can use some of it?

@ChrisVanDijk

This comment has been minimized.

Show comment
Hide comment
@ChrisVanDijk

ChrisVanDijk Feb 22, 2017

@JimBobSquarePants The code and performance is bad, but I really needed the ability to open Tiff files. It's a temporary solution until a better one.

ChrisVanDijk commented Feb 22, 2017

@JimBobSquarePants The code and performance is bad, but I really needed the ability to open Tiff files. It's a temporary solution until a better one.

@JimBobSquarePants

This comment has been minimized.

Show comment
Hide comment
@JimBobSquarePants

JimBobSquarePants Feb 22, 2017

Member

@ChrisVanDijk understandable. Tiff is a complex format so I'm pushing it to the backburner until I can get everything else out of the way... Not looking forward to tackling it!

Member

JimBobSquarePants commented Feb 22, 2017

@ChrisVanDijk understandable. Tiff is a complex format so I'm pushing it to the backburner until I can get everything else out of the way... Not looking forward to tackling it!

@antonfirsov

This comment has been minimized.

Show comment
Hide comment
@antonfirsov

antonfirsov Feb 22, 2017

Member

@ChrisVanDijk @JimBobSquarePants One big "advantage" of these naive C ports is that its really not that hard to make the first steps towards speeding & cleaning them up.
Someone with time & a profiler could check it, and estimate the efforts needed reuse/refactor elements of that code.

Member

antonfirsov commented Feb 22, 2017

@ChrisVanDijk @JimBobSquarePants One big "advantage" of these naive C ports is that its really not that hard to make the first steps towards speeding & cleaning them up.
Someone with time & a profiler could check it, and estimate the efforts needed reuse/refactor elements of that code.

@Andy-Wilkinson

This comment has been minimized.

Show comment
Hide comment
@Andy-Wilkinson

Andy-Wilkinson Feb 22, 2017

Contributor

@JimBobSquarePants I've got the basics of reading the Tiff format itself working from my own project (I started here since many Camera Raw files are mutant Tiff files). As you mention, there are a number of compression formats, but the key ones probably aren't too much trouble. The one issue with my existing codebase is that it was a bit of an experiment in a more functional style of C#, rather than how you might structure it normally.

All that said, I know a fair amount about the Tiff format now, so probably would be able to make a quick start on a true ImageSharp Tiff codec pretty easily (and share a bit of the code where I can). Would you be interested in me picking up this issue and giving it a start? (especially since you guys seem to be busy enough with the existing codec perf 😄)

Contributor

Andy-Wilkinson commented Feb 22, 2017

@JimBobSquarePants I've got the basics of reading the Tiff format itself working from my own project (I started here since many Camera Raw files are mutant Tiff files). As you mention, there are a number of compression formats, but the key ones probably aren't too much trouble. The one issue with my existing codebase is that it was a bit of an experiment in a more functional style of C#, rather than how you might structure it normally.

All that said, I know a fair amount about the Tiff format now, so probably would be able to make a quick start on a true ImageSharp Tiff codec pretty easily (and share a bit of the code where I can). Would you be interested in me picking up this issue and giving it a start? (especially since you guys seem to be busy enough with the existing codec perf 😄)

@JimBobSquarePants

This comment has been minimized.

Show comment
Hide comment
@JimBobSquarePants

JimBobSquarePants Feb 22, 2017

Member

@antonfirsov I've found with those ports though there's about a million lines more code than I'd like to read nested in there.

@Andy-Wilkinson That would be absolutely brilliant if you could! 💯

Member

JimBobSquarePants commented Feb 22, 2017

@antonfirsov I've found with those ports though there's about a million lines more code than I'd like to read nested in there.

@Andy-Wilkinson That would be absolutely brilliant if you could! 💯

@sandorfr

This comment has been minimized.

Show comment
Hide comment
@sandorfr

sandorfr Aug 3, 2017

I come across this library https://github.com/BitMiracle/libtiff.net which is already .netstandard compatible.
It's under new BSD license https://github.com/BitMiracle/libtiff.net/blob/master/license.txt

I feel like this is a good candidate to bring support for TIFF.

What do you think?

sandorfr commented Aug 3, 2017

I come across this library https://github.com/BitMiracle/libtiff.net which is already .netstandard compatible.
It's under new BSD license https://github.com/BitMiracle/libtiff.net/blob/master/license.txt

I feel like this is a good candidate to bring support for TIFF.

What do you think?

@JimBobSquarePants

This comment has been minimized.

Show comment
Hide comment
@JimBobSquarePants

JimBobSquarePants Aug 3, 2017

Member

@sandorfr We've already got a WIP TIFF PR in progress #119

The BitMiracle repositories, to put it nicely, are junk. Poorly ported, slow, bloated implementations that are useful only for testing against.

Member

JimBobSquarePants commented Aug 3, 2017

@sandorfr We've already got a WIP TIFF PR in progress #119

The BitMiracle repositories, to put it nicely, are junk. Poorly ported, slow, bloated implementations that are useful only for testing against.

@poeman16

This comment has been minimized.

Show comment
Hide comment
@poeman16

poeman16 Aug 1, 2018

Any updates on #119? Thanks!

poeman16 commented Aug 1, 2018

Any updates on #119? Thanks!

@Andy-Wilkinson

This comment has been minimized.

Show comment
Hide comment
@Andy-Wilkinson

Andy-Wilkinson Aug 12, 2018

Contributor

@poeman16 : Unfortunately I've had pretty much zero time to devote to working on this pull request for a while. The foundations of parsing the TIFF structure was mostly in place, with the most complex area remaining being implementations for the different compression formations, in particular those based on JPEG. There would need to be some changes to fit with any changes in the ImageSharp design since the last commit. Definitely something that could be picked up by someone.

Contributor

Andy-Wilkinson commented Aug 12, 2018

@poeman16 : Unfortunately I've had pretty much zero time to devote to working on this pull request for a while. The foundations of parsing the TIFF structure was mostly in place, with the most complex area remaining being implementations for the different compression formations, in particular those based on JPEG. There would need to be some changes to fit with any changes in the ImageSharp design since the last commit. Definitely something that could be picked up by someone.

@JimBobSquarePants

This comment has been minimized.

Show comment
Hide comment
@JimBobSquarePants

JimBobSquarePants Aug 12, 2018

Member

There's been a lot of changes in the main repo since the PR was opened. We'll have to do a lot of work to update the codebase before support can be completed.

Member

JimBobSquarePants commented Aug 12, 2018

There's been a lot of changes in the main repo since the PR was opened. We'll have to do a lot of work to update the codebase before support can be completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment