OPENSLIDE-WRITE-PNG(1)

πŸ’– OPENSLIDE-WRITE-PNG πŸ’–

okay bestie, welcome to the openslide-write-png page β€” it's a User Command from the OpenSlide fam, and it's literally here to grab a lil chunk of a virtual slide and spit it out as a PNG. so cute, so useful, let's get into it ✨


🌸 NAME 🌸

openslide-write-png β€” write a region of a virtual slide to a PNG πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

openslide-write-png [--help] [--version] slide-file x y level width height output-file

like, that's the whole vibe. one command, seven-ish little args, no drama πŸ’…


✨ DESCRIPTION ✨

So here's the tea: this command writes a region of the specified level of a virtual slide out to a PNG image. no cap, that's the entire job. 🫢

Quick vocab check on the coordinates, because the levels thing trips people up:

  • x and y are pixel coordinates in level 0 β€” that's the highest-resolution slide level, the big one, the main character πŸ‘‘
  • width and height are pixel dimensions in the specified level (not level 0!) β€” so they get measured at whichever level you asked for 🧚
not me knowing that the level 0 / specified-level switcheroo is exactly where everyone messes up πŸ™ˆ

And if you're sitting there like "bestie, how do I even know how big each level is??" β€” the dimensions of each level of a slide can be obtained with openslide-show-properties(1). go peek, it'll tell you 🌈


πŸ’… OPTIONS πŸ’…

  • --help β€” display usage summary. short, sweet, does what it says πŸ’–
  • --version β€” display version and copyright information. the receipts, basically πŸ“œ

πŸ”₯ EXIT STATUS πŸ”₯

openslide-write-png returns:

  • 0 on success β€” slay, it worked πŸŽ‰
  • 1 if an error occurred β€” something went sideways 😭
  • 2 if the arguments are invalid β€” the args said "no" πŸ’€

πŸ“ NOTES πŸ“

okay important heads-up, listen up:

openslide-write-png is a legacy command and no new features will be added. periodt. it's iconic, it's still here, but it's not getting any glow-ups πŸ’…

Its replacement is the region read subcommand of slidetool(1). so if you're starting fresh, that's your girl ✨


Copyright Β© 2007-2023 Carnegie Mellon University and others

OpenSlide is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1 ⟨http://gnu.org/licenses/lgpl-2.1.html⟩.

OpenSlide comes with NO WARRANTY, to the extent permitted by law. See the GNU Lesser General Public License for more details.


🌈 SEE ALSO 🌈


and that's the whole page, bestie!! mwah πŸ’‹ this was OpenSlide 4.0.0, dated 2023-06-30 β€” go forth and PNG-ify some slides, you've got this πŸ¦‹βœ¨

πŸ“¦ where this page comes from