|
Jonny 290 posted:make a cryptocurrency based on yosposts
|
# ? Jun 2, 2021 14:45 |
|
|
# ? May 13, 2024 12:23 |
|
POSTCOINT++
|
# ? Jun 2, 2021 14:54 |
|
i think for now ill stick to lovely forum badges
|
# ? Jun 2, 2021 14:55 |
|
well anyway now im trying to figure out if there's a way to test if an image is entirely transparent as in, test if the image is nothing BUT transparent pixels, no color whatsoever
|
# ? Jun 2, 2021 15:04 |
|
hbag posted:well anyway now im trying to figure out if there's a way to test if an image is entirely transparent if you dig in to the png spec youll find this shouldnt really be that hard. start here: https://www.w3.org/TR/PNG/#11transinfo
|
# ? Jun 2, 2021 15:09 |
|
fart simpson posted:if you dig in to the png spec youll find this shouldnt really be that hard. start here: https://www.w3.org/TR/PNG/#11transinfo nice, ill give this a read
|
# ? Jun 2, 2021 15:10 |
|
welp after reading this im not sure if theres an alpha channel for the ENTIRE image's transparency or if there's only alpha channels for individual pixels
|
# ? Jun 2, 2021 15:25 |
|
hbag posted:welp after reading this im not sure if theres an alpha channel for the ENTIRE image's transparency or if there's only alpha channels for individual pixels couldn't you just check every pixel then?
|
# ? Jun 2, 2021 15:30 |
|
hbag posted:welp after reading this im not sure if theres an alpha channel for the ENTIRE image's transparency or if there's only alpha channels for individual pixels realistically your image library probably can do this for you. without having used it before i'd probably try this method and see if the max value for the alpha band is 0, assuming there is an alpha band https://pillow.readthedocs.io/en/stable/reference/Image.html#PIL.Image.Image.getextrema idk if that will actually work but read the docs imo
|
# ? Jun 2, 2021 15:31 |
|
Should create an app that shows how much a user has spent on AV changes.
|
# ? Jun 2, 2021 15:35 |
|
Broken Machine posted:couldn't you just check every pixel then? i dont think checking the transparency of a pixel at most 32,400 times is very efficient fart simpson posted:realistically your image library probably can do this for you. without having used it before i'd probably try this method and see if the max value for the alpha band is 0, assuming there is an alpha band ill give it a try
|
# ? Jun 2, 2021 15:35 |
|
hbag posted:i dont think checking the transparency of a pixel at most 32,400 times is very efficient 32,400 is not a big number for a computer though
|
# ? Jun 2, 2021 15:37 |
|
hbag posted:i dont think checking the transparency of a pixel at most 32,400 times is very efficient your computer has 2 to 8 processing units capable of comparing a number to another number around 3 billion times per second. if you count the gpu it's more like 2000 processing units
|
# ? Jun 2, 2021 15:40 |
|
Sagebrush posted:your computer has 2 to 8 processing units capable of comparing a number to another number around 3 billion times per second. Yeah? Then why is my poasting so bad buddy? you tell me that
|
# ? Jun 2, 2021 15:43 |
|
whatever server that repl.it feels like letting me use for free was able to compare 32,400 integers to 0 in under 7 milliseconds
|
# ? Jun 2, 2021 15:51 |
|
Sagebrush posted:your computer has 2 to 8 processing units capable of comparing a number to another number around 3 billion times per second. actually i have a ryzen 5 2600 so it actually has 12 logical processors
|
# ? Jun 2, 2021 15:54 |
|
i have a ryzen with 24 logical processors.
|
# ? Jun 2, 2021 16:05 |
|
fart simpson posted:
also there’s a short circuit scenario where if you hit a certain percentage of transparent pixels, let’s say 10%, you can kill the loop and have a pretty good guess it’s an image with some sort of transparency and not have to process the whole image. but also some image libraries might already have a method to do this but it might be a fun exercise to implement your own method and compare for ~*~learning~*~
|
# ? Jun 2, 2021 16:06 |
|
Sagebrush posted:i have a ryzen with 24 logical processors. sounds like you could handle a whole megapixel sized image with that bad boy
|
# ? Jun 2, 2021 16:06 |
|
fart simpson posted:sounds like you could handle a whole megapixel sized image with that bad boy *slaps top of desktop causing all the rgb lights to flicker* heh, yeah this thing can just poo poo out prime numbers, ol’ reliable I call it
|
# ? Jun 2, 2021 16:08 |
|
anyway now im trying to figure out how to grab someone's avatar from their profile starting with this and seeing what errors it gives me pre:avatar = (userProfile.select_one('.userinfo .title')).find('img') print(str(avatar))
|
# ? Jun 2, 2021 16:20 |
|
in a shocking turn of events it actually worked first time hoiy poo poo
|
# ? Jun 2, 2021 16:22 |
|
hbag posted:in a shocking turn of events it actually worked first time pro tip: if you use a statically typed compiled language you’ll encounter this more often imo
|
# ? Jun 2, 2021 16:25 |
|
fart simpson posted:a toribot that interrupts ongoing discussions about x by posting “x is from pittsburgh” bot accounts aren’t alowed to post outside dedicated containment threads, as of the last time a toribot was written
|
# ? Jun 2, 2021 16:30 |
|
hbag posted:i dont think checking the transparency of a pixel at most 32,400 times is very efficient you will indeed have to check every pixel. It is possible for an image to have a single opaque pixel and every other pixel transparent. also python image tools loving SUCK.
|
# ? Jun 2, 2021 17:16 |
|
or they did five or six years ago when i was fuckin around with them. They punt everything to imagamagick which is great for quick resizing and poo poo but if you want to actually do pixel by pixel ops on an image it was UGH with a capital UGH
|
# ? Jun 2, 2021 17:17 |
|
i’ve got terminal scientist brain so obviously the answer is figuring out how people cast images into numpy arrays. presumably some library must do that easily so people can feed their dog images into their neural nets or whatever. with numpy arrays checking the value of all the pixels is quick since you don’t have to actually do it in native python, and it can be automatically done in parallel. but then you’re adding another library so
|
# ? Jun 2, 2021 18:00 |
|
i think like checking each pixel for alpha channel is probably fine but if you're trying to do someting even mildly sophisticated like convolution is a massive pain in the rear end
|
# ? Jun 2, 2021 18:03 |
|
if you like doing image stuff, the JAI is very robust https://www.oracle.com/java/technologies/advanced-imaging-api.html
|
# ? Jun 2, 2021 18:04 |
|
but i guess its on a fasttrack to EOL so idk I assume there's other good imaging libraries but that was the one i used and really liked.
|
# ? Jun 2, 2021 18:06 |
|
tbh what i wanna do is text if theyve got an invisible avatar with their actual av being gangtags beneath it (like i do) so i can display that instead of the blank 1 pixel tall thing they got
|
# ? Jun 2, 2021 18:25 |
|
hbag posted:quick give me cool ideas for lovely web toys to make for the forums update this: https://chrome.google.com/webstore/detail/sa-needful/bipfbhacdgoojjfblifgjadhabepbekm
|
# ? Jun 2, 2021 19:20 |
|
you could also update that greasemonkey or w/e script that completely memoryholed ignored posters instead of leaving the placeholder posts. that was nice.
|
# ? Jun 2, 2021 20:14 |
|
it was a couple of ublock filters i wrote but honestly i haven't needed them since stymie and the gang got banned. one that blocks smoka youtube posts while leaving ones containing text would still be handy though.
|
# ? Jun 2, 2021 20:18 |
|
Jonny 290 posted:you could also update that greasemonkey or w/e script that completely memoryholed ignored posters instead of leaving the placeholder posts. that was nice. i should do an SA browser plugin
|
# ? Jun 2, 2021 20:19 |
|
hbag, are you familiar with nntp
|
# ? Jun 2, 2021 20:19 |
|
rotor posted:hbag, are you familiar with nntp there it is
|
# ? Jun 2, 2021 20:40 |
|
rotor posted:also python loving SUCKS.
|
# ? Jun 2, 2021 20:48 |
|
rotor posted:hbag, are you familiar with nntp no but it sounds like some kind of designer drug that'll induce a ruptured aneurysm if you fall either side of its very slim margin of safe dosage
|
# ? Jun 2, 2021 20:58 |
|
|
# ? May 13, 2024 12:23 |
|
so you have heard of it
|
# ? Jun 2, 2021 21:46 |