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

Upgrade ImageSharp dependency version #9

Closed
Nominom opened this issue Nov 25, 2020 · 11 comments · Fixed by #32
Closed

Upgrade ImageSharp dependency version #9

Nominom opened this issue Nov 25, 2020 · 11 comments · Fixed by #32
Labels
enhancement New feature or request

Comments

@Nominom
Copy link
Owner

Nominom commented Nov 25, 2020

No description provided.

@Nominom Nominom added the enhancement New feature or request label Nov 25, 2020
@juliusfriedman
Copy link

juliusfriedman commented Jan 18, 2021

@Nominom
Copy link
Owner Author

Nominom commented Jan 18, 2021

Do you mean removing ImageSharp as a whole and switching to Span2D for the api, or just adding them as extra methods? I've been thinking of eventually removing ImageSharp, but I would need a way to load at least some basic image format (like png or tga). Mipmaps are also generated with ImageSharp but I guess implementing my own resizing wouldn't be too much of a task.

@juliusfriedman
Copy link

juliusfriedman commented Jan 18, 2021

I would be willing to work with you on an Encoder / Decoder interface class which works with either Pipes, Sequences, Streams or whatever your preferred paradigm is; I had selected Stream for my previous such attempts for various reasons including Stream being able to read and write directly from such. The basic implementation of such would be light and there in allow for any type of encapsulated operation from a derived class.

I hate to minimize it to such but all an Encoder / Decoder is just a way of getting data in or out of memory such that it conforms to the expected bit patterns, adding formats after that is super trivial. (See System.Text for plenty of examples)

I am not saying my implementation is the best (it can definitely be improved performance wise for example) but it tis very general and allows for quite contrived scenarios such as specially formatted data (BRAG) in which format the alpha embeds audio data as well as the bits required for transparency information [and has some legacy 3d capacities if stereoscopy if not utilized] ...

Resizing is also trival given that the filtering and subsampling techniques are what provide better or worse such scales I would intuit that a few basic such scalers would be created (See MagikHarp or Gyrados.. .I don't have the links off hand) and that implementation would serve as a good enough.

From there one can refine as much as required or implement an alternative such strategy using some of the components from adjacent parts of the image...

I am sure you know all this know and I waste my type inferring such....

May I infer, What do you see the biggest thing that ImageSharp provides you outside of the limited implementation of JPEG, PNG and GIF which it provides?

If that is all then just work on a basic conforming implementation of those things and you have what you need...

I have done this for MediaFiles in general https://github.com/juliusfriedman/net7mma_core/blob/e7b228cfd6ce36401e11d1d1f31b29a4e9d41ba0/Containers/IMediaContainer.cs

I have the JPEG Part mostly in reader form, writing would be trivial... https://github.com/juliusfriedman/net7mma_core/blob/e7b228cfd6ce36401e11d1d1f31b29a4e9d41ba0/Codecs/Image/Jpeg/MarkerReader.cs

You are more than welcome to any of my code if it helps your project have less dependencies, you need not even bear the license where you got the code from if such makes it more palatable, I give thee full permissions.

All I would ask is that I would be able to move more of the Codec stuff to a library where we both maintain it, there are many variations of all such media and thinking we can provide something to encompass all such is ... ambitious enough to be Ludacris as to type.

My library was never focuses on codecs, I just wanted to provide it would be able to to be done in ALL managed code if you had the ambition to do so. I currently only have the ambition to extend the channel size from byte to something (possibly via a derived class) [to eventually allow for higher channel interlinks such as from a human brain].

Hopefully none of that came across wrong.

Thank you for your library and let me know if I can be of any assistance.

In closing, I think this library would astringe be very useful for allowing those patients with various types of implants to upgrade the capabilities and resolution of the implants.

In doing such many legacy codecs will need to be implemented and derived with profiles to allow for such adaptation.

Without the proper hardware and labs I am not sure how much help I would be in that regard but the possibilities of such are quite endless; I assure you.

@Nominom
Copy link
Owner Author

Nominom commented Jan 19, 2021

I really like the idea of a Stream-based encoder/decoder class. If you're willing to help, I created an discussion issue for it in #27.

ImageSharp is only used for the few basic formats and mipmap resizing. If I can implement my own Rgba32Image class that could at least do png and jpeg, then I can easily drop it as a dependency. Implementing a resizing algorithm is not an issue.

I'm not sure what you mean by the brain-interfacing and implant stuff, but I'm assuming you mean to use the BcEncoder as some sort of compression layer between the implant and some other device? I'm interested in hearing more about your use-case.

@onepiecefreak3
Copy link
Contributor

onepiecefreak3 commented Jan 20, 2021

To be honest, how did the wall of text comment above talk about audio buffers, and abstract derivations for brain interlinks? This is BCn, an image compression. Nothing more, nothing less. What exactly do brain interfaces have to do with this in any way? Or audio for that matter?

@juliusfriedman
Copy link

juliusfriedman commented Jan 20, 2021

Umm its the most basic type of transform.. hence why you want TGA support et al. Right? I might need the TGA data converted to a block format my implant supports such that I can send it data which it otherwise would have not. In other words I can transcode from one type to the other using a Transform. You don't need format support to type you just need to support the underlying layout of the data in other type its stride. Audio is Video to some system, The human brain? I am not sure you want my insight into such.

@onepiecefreak3
Copy link
Contributor

onepiecefreak3 commented Jan 20, 2021

I think your ideas are way out of scope for this library, honestly. If you want to load TGA's and then decode the BC format in it, you can already do so. Just load the TGA with something else and decode its data with the DecodeRaw methods.
Also for which systems is Audio, Video? If you talk about systems that are not computers, I would like to reiterate, that such is out of scope for this library imo.
How the human brain sees and transforms images/data is also not really relevant to this specific library.

@Nominom
Copy link
Owner Author

Nominom commented Jan 20, 2021

There might have been a bit of a misunderstanding. Tga (truetype targa) is an image format commonly used for raw textures in games. It does not contain any audio to my knowledge.

@juliusfriedman
Copy link

juliusfriedman commented Jan 20, 2021

There might have been a bit of a misunderstanding. Tga (truetype targa) is an image format commonly used for raw textures in games. It does not contain any audio to my knowledge.

That is correct, By default no it doesnt.

@juliusfriedman
Copy link

juliusfriedman commented Jan 20, 2021

I think your ideas are way out of scope for this library, honestly. If you want to load TGA's and then decode the BC format in it, you can already do so. Just load the TGA with something else and decode its data with the DecodeRaw methods.
Also for which systems is Audio, Video? If you talk about systems that are not computers, I would like to reiterate, that such is out of scope for this library imo.
How the human brain sees and transforms images/data is also not really relevant to this specific library.

Dually noted and summarily overruled when I hear from @Nominom et the majority it will be different.

If you have any more questions let me know.

good day

@juliusfriedman
Copy link

I really like the idea of a Stream-based encoder/decoder class. If you're willing to help, I created an discussion issue for it in #27.

ImageSharp is only used for the few basic formats and mipmap resizing. If I can implement my own Rgba32Image class that could at least do png and jpeg, then I can easily drop it as a dependency. Implementing a resizing algorithm is not an issue.

I'm not sure what you mean by the brain-interfacing and implant stuff, but I'm assuming you mean to use the BcEncoder as some sort of compression layer between the implant and some other device? I'm interested in hearing more about your use-case.

PNG? JPEG? Done. I mean both have been done to death in various forms depending on the profile and amount of proprietary extension you want to support...

I doubt you would need the writer but I intuit so much.

Thank you for your time and comments!

@Nominom Nominom linked a pull request Feb 6, 2021 that will close this issue
@Nominom Nominom closed this as completed Feb 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants