Generate Graphics with transparent background (for insertion/overlay in Google Sheets)?
Stupid but infuriating question. I copy/paste or generate clippings of Zemax layouts to ‘layer’ using PowerPoint, which has the capability of making any color (white, in this case) TRANSPARENT. I use this all the time to do mulitple leg layouts.
My new employer insists on using Google Sheets (sheesh). It’s MAJOR drawback is inability to do this. It can ‘import’ .pptx files with the graphics already ‘messaged’ I think, but if I don’t HAVE PowerPoint … ARRRRGGHH.
Trying various things, saving as GIF, PNG, JPG does NOT seem to work. Doing screenshots, using the Win 10 Clip accessory, etc. … nope.
Page 1 / 1
Yes, I know … I can do multiconfig but it’s a pain for this sort of thing, have lots of optics in multiple legs (several beamsplitters in system).
Seems like IrfanView is an option, one/several extra steps though. Arrrggghhh. Oh well.
I use SnagIt, and I can set the transparency color there
Thanks, I’ll try that out ...
Looked at several free tools, does seem like Snagit ($63 + $12.95/year) is the best … for this ONE thing. Sheesh. That’s all I really need it to do. It has a preset to capture screenshots with a ‘replacement’ color (white to transparent). Works for me. Thanks, Mark.
I use SnagIt, and I can set the transparency color there
Looked at several free tools, does seem like Snagit ($63 + $12.95/year) is the best … for this ONE thing. Sheesh. That’s all I really need it to do. It has a preset to capture screenshots with a ‘replacement’ color (white to transparent). Works for me. Thanks, Mark.
That may be the only thing you need it for, but SnagIt is one of those ‘I can’t be without’ tools on my PC. It just seems to do whatever it is you need at that moment. It’s a great tool.
I am too cheap to actually buy a utility if I can find a free one online (that doesn’t scare me too much by looking like malware).
I also have often needed to make a background transparent.
I’ve been using tools at this web site for the occasional file:
I think I have found other online file editing tools in the past that can do this, but most recently this is my favorite for its convenience in uploading files and variable configurations to optimize the appearance of the output file.
One must do this one file at a time, and take care of file naming for the output files (which are all initially saved with the same file name). But once you have your settings tweaked (thresholds for background color etc.), it doesn’t take too long to do this to multiple files that you can then insert/overlay into PPT.
There are also versions of these tools for MANY other file formats, but if I recall correctly, trying to do this e.g. to a JPEG using the “onlinejpgtools” page, the output turned out to be in PNG format, anyway. And I have had good luck using PNGs in PPT (as opposed to JPEGs). Look at the drop-down menu of these other conversion pages at the far upper-right of either of these pages.
I don’t know who these “Team Browserling” guys are, but I appreciate their making these tools available.
If you find good alternatives, RickSPI58 or Mark, please add them to this thread anytime!
-- Greg
I am too cheap to actually buy a utility if I can find a free one online (that doesn’t scare me too much by looking like malware).
I also have often needed to make a background transparent.
...
If you find good alternatives, RickSPI58 or Mark, please add them to this thread anytime!
-- Greg
If you’re using PowerPoint, it will do that internally. Now I forget what the command/sequence is … but you can select the graphic and there’s a menu item for making the background (or whatever color you click on) transparent.
I’m being strongly “encouraged” to use Sheets … which lacks a few things in comparison.
Gah! Sorry I missed some of your essential points (like you are being asked to paste pictures not into Google Slides (presentation software like PowerPoint) but instead into Sheets (spreadsheet software like Excel!).
If I find something to work with Sheets (which I never use), I’ll let you know.
Meanwhile, thank you for mentioning the built-in PowerPoint feature. I have the latest perpetual license version 2021 on my Mac and can look for that there.
Another thing I have done is used a free photo editor on the Mac (Seashore) to layer images. Not sure whether it (or Windows equivalents that might be available) can actually create transparent backgrounds, though.
I actually don’t have Microsoft Office on my Windows 10 “Zemax computer.” I use SoftMaker FreeOffice (www.freeoffice.com) from German company SoftMaker which is quite full-featured...maybe you can try that if you’re a Windows guy. Their equivalent applications are PlanMaker (spreadsheet), Presentations (like PPT), and TextMaker (word processor). And their non-free SoftMaker Office is inexpensive, too. Who knows, maybe you could “launder” an image through one of those?
-- Greg
I found the PPT technique to make the white areas in a OpticStudio sequential 3D Layout transparent, and have tested it in the most recent Microsoft Office 2021 for Mac (perpetual license).
First select the layout picture in the PPT.
Then, what NOT to do: Under Picture Format tab, do NOT choose the “Remove Background” tool at the far left of the menu, because it requires you to draw an area to keep or to remove (OK for cutting out a patch of an image, but not for areas between rays!!).
Also, do NOT try to use Transparency > Picture Transparency Options… because that applies transparency to every pixel in the entire image.
*** Instead, use Color > Set Transparent Color.
Cursor changes to a different type of arrow pointing diagonally to the left and down; point to a pixel in the white area WITHIN the selected picture, and click to make all pixels of the white background transparent.
This works pretty well. The surfaces and rays all look fine in the layout afterward. My only beef is that the black text in the “frame” and title of the layout (e.g., “3D Layout”) has edges highlighted with white pixels that makes the frame difficult to read. In my practice, I have not used the frame when overlaying layouts...or just kept one without the background removed, and layered more layouts on top of it without duplicate frames.
Note that when trying to align layouts, it helps to choose a surface for the Global Coordinate Reference that makes it easy to overlay plots keeping the scale constant so that you don’t have to manually move everything e.g. to make all the Image planes line up (if that was what you wanted).
-- Greg
Gah! From me now … it’s Google SLIDES that I am being ‘forced’ to use. Sorry.
In any case, I bought Snagit. I tried 2 or 3 freeware/trial programs but none were as simple for my main purpose.
There’s presets in Snagit, I have the default being ‘Color Replacement’ (white to transparent). ALMOST as easy as double clicking in PowerPoint and selecting the item that makes background transparent.