PNG2FB(nged)

load a PNG image into the current display framebuffer

πŸ“… published 7.44.0, from nixpkgs unstable

✨ PNG2FB (nged) ✨

okay bestie, welcome to the png2fb page from the BRL-CAD User Commands manual β€” this is literally the glow-up tool for your framebuffer πŸ’…


🌸 NAME 🌸

png2fb β€” load a PNG image into the current display framebuffer πŸ–ΌοΈβœ¨


πŸ¦‹ SYNOPSIS πŸ¦‹

png2fb [-H -i -c -v -z -1] [-m lines] [-g screen_gamma]
       [-x file_xoff] [-y file_yoff] [-X scr_xoff] [-Y scr_yoff]
       [-S squarescrsize] [file.png]

πŸ’– DESCRIPTION πŸ’–

so the png2fb command reads a PNG (Portable Network Graphics) image file and slays it right into the framebuffer of your current display manager. it overlays the rendered image on top of the MGED display, which is giving main character energy fr fr πŸŽ€

if you don't hand it a file.png, png2fb reads from standard input. no file, no problem, it'll just vibe with stdin 🫢

heads up bestie: this command requires the current display manager to have an associated framebuffer. if there's no framebuffer available, you get an error. no framebuffer, no slay. 😭

✨ Options ✨

  • -H β€” use the framebuffer's hardware size for the display dimensions instead of the PNG image's size. hardware knows best, periodt.
  • -i β€” invert the image (flips vertically when reading from a file). upside-down era πŸ™ˆ
  • -c β€” clear the framebuffer to black before displaying the image. fresh canvas, clean slate πŸ’€
  • -v β€” verbose mode: prints extra info while loading, so you can watch it cook πŸ‘€
  • -z β€” zoom the image to fill the framebuffer. big picture energy πŸ”₯
  • -1 β€” use a single line at a time for I/O β€” slower, but uses less memory. lowkey frugal, highkey iconic 🧚
  • -m lines β€” read lines lines at a time from the PNG file (default: vary). the default just does its own thing, iykyk.
  • -g screen_gamma β€” apply the specified gamma correction value to the display. color-corrected queen πŸ‘‘
  • -x file_xoff β€” horizontal offset (in pixels) into the PNG file to start reading. skip to the good part.
  • -y file_yoff β€” vertical offset (in pixels) into the PNG file to start reading.
  • -X scr_xoff β€” horizontal offset on the framebuffer screen to begin writing.
  • -Y scr_yoff β€” vertical offset on the framebuffer screen to begin writing.
  • -S squarescrsize β€” set both the screen width and height to squarescrsize pixels. a perfect square, a perfect vibe πŸ“

🌈 EXAMPLES 🌈

Example 1. Display a PNG image in the framebuffer

mged> png2fb render.png

loads render.png into the current display framebuffer. that's it, that's the whole moment ✨

Example 2. Clear framebuffer and display at an offset

mged> png2fb -c -X 100 -Y 50 overlay.png

clears the framebuffer first, then displays overlay.png starting at screen position (100, 50). chef's kiss placement πŸ’…


🌟 SEE ALSO 🌟

  • fbclear(nged)
  • screengrab(nged)

πŸ’œ AUTHOR πŸ’œ

BRL-CAD Team 🫢


πŸŽ€ BUG REPORTS πŸŽ€

reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org β€” tell them everything, bestie, they wanna know πŸ“§


not me wrapping up with the credits: this masterpiece comes to you from BRL-CAD, page PNG2FB(nged). mwah, stan, bye πŸ’–βœ¨πŸŽ€
πŸ“¦ where this page comes from