Post AoFev8MM83gLLkNuDo by curtmack@floss.social
 (DIR) More posts by curtmack@floss.social
 (DIR) Post #AoFb3Np67V9LoEVSk4 by foone@digipres.club
       2024-11-21T00:23:15Z
       
       0 likes, 0 repeats
       
       stupid scripts I find I need and I'm pretty sure don't exist:I need to find the rightmost pixel in this image that isn't magic pink
       
 (DIR) Post #AoFb5kZaVX5WwhNeTY by foone@digipres.club
       2024-11-21T00:23:33Z
       
       0 likes, 0 repeats
       
       I guess I could replace the pink by transparent and autocrop it in the GNU image editor
       
 (DIR) Post #AoFev8MM83gLLkNuDo by curtmack@floss.social
       2024-11-21T01:06:29Z
       
       0 likes, 0 repeats
       
       @foone The GNU's Not UNIX Image Manipulation Program's "Crop to Content" function should be able to remove the pink border without any pre-processing.
       
 (DIR) Post #AoFfNpKPxwBMiu9ygi by jleedev@mastodon.sdf.org
       2024-11-21T01:11:33Z
       
       0 likes, 0 repeats
       
       @foone numpy!import imageio,numpy as npim = imageio.v3.imread('gomez.png')rgb = ( (im[:,:,0].astype('uint32') << 16)      | (im[:,:,1].astype('uint32') << 8)      | (im[:,:,2].astype('uint32') << 0)      )xs, ys = (rgb != 0xff00ff).nonzero()xmin, xmax = xs.min(), xs.max()ymin, ymax = ys.min(), ys.max()
       
 (DIR) Post #AoFg5zdZ00MvRAAvey by foone@digipres.club
       2024-11-21T01:19:39Z
       
       0 likes, 0 repeats
       
       I wrote some dumb code to iteratively crop the image and count how many colors were left.Hopefully it survived the power outage
       
 (DIR) Post #AoFgt8iu0Q75o56iVk by superflippy@mastodon.xyz
       2024-11-21T01:28:35Z
       
       0 likes, 0 repeats
       
       @foone My first thought is that there’s got to be an ImageMagick command for this. https://imagemagick.org/script/index.php
       
 (DIR) Post #AoGClNjnUnEEacs2Pw by hattifattener@wandering.shop
       2024-11-21T07:25:41Z
       
       0 likes, 0 repeats
       
       @foone netpbm and sed/perl, my friend