« first day (4090 days earlier)      last day (1075 days later) » 

00:00
panic: kernel trap (ignored) (source)
 
3 hours later…
03:28
doodles
 
4 hours later…
07:14
posted on January 03, 2022 by workchronicles

The post My New Year Resolution: Work Longer Hours appeared first on Work Chronicles.

 
4 hours later…
11:27
Mornin'
Nice day for fishing, ain't it?
Huehue
Zoe
Zoe
:D
someone is watching epic npc man
I stumbled over it by chance again :D
11:44
I stumbled over this youtube.com/watch?v=rVIZx3Cl78k
12:43
I maintain a Java library.
**Problem**: To decode PNGs it uses `javax.imageio`which makes it unusable on Android.
**Question**: Is there a PNG decoder that can be used both on desktop and on Android? If not, can I avoid duplicating Gradle/everything?

(Maybe create a PNG decoding library and provide two implementations, one for desktop and one for Android? Not sure how the library would automatically choose the correct implementation, though.)
disclaimer, I have no clue how the png encoding works
1, can you provide the processing yourself?
perhaps even copy the source code for the javax.imageio stuff and make it androidable
2, search for a cross platform png decoder library (including asking in chats as you did, but only for the small chance that you find someone who had a similar problem before and solved it)
3, can you remote process the pngs? how much processing does it take? how often does it need to be processed? etc
if possible, you could host a very cheap (if not free) solution as a serverless cloud function on any of the major cloud service providers
4, you could make a trio library
one with the programming interface
one with the desktop implementation
one with the android implementation
there is some maven/gradle thingy to specify that it should only work on specific platforms so that the wrong ones are ignored when building for a different platform
you could even just have the interface library and not provide the implementations
given that the interfaces are very simple, the implementation adapters should be relatively easy as well
usually, when I have a very simple interface with undefined implementations, I just make it a function instead
Function<byte[], Png> could be the type of the function
and the implementations could be new PngDecoder()::decode
although, you would have to look at examples to see how people would actually use such decoders then
13:06
13:55
@NicolasRaoul Take the source code from the JRE and manually copy-paste it into your library?
14:23
Thanks everyone!
The library will be embedded in apps, so I want to keep it as small as possible. That might rule out 1 and 2.
It must work offline, which rules out 3.
4 sounds good, I will try!
14:50
@Wietlol Hmm I should read more before posting.
@NicolasRaoul gl
@Michael nah :)
mob arguments are the best kind of arguments
 
6 hours later…
20:53
hums a song

« first day (4090 days earlier)      last day (1075 days later) »