Welcome! Log In Create A New Profile

Advanced

How to chenge the background color when exporting PNGs. by

Posted by loskiorama 
How to chenge the background color when exporting PNGs. by
May 21, 2015 08:21PM
I'm using the command line export to PNG option.
and I'd like the background color to be white on the exported images insted of the yelowwish that comes by default.

How could I do this?

Best!
Re: How to chenge the background color when exporting PNGs. by
May 22, 2015 04:45AM
You can use a program (e.g. XnConvert) to change the color:



Otherwise you would have to change the source to allow specifying the background color.
WYSIWYG. Export simply turns the visual display into a PNG file.

To do this from a BATCH file use: nconvert -replace 255 255 229 255 255 255

Edited 1 time(s). Last edit at 05/22/2015 04:50AM by rhmorrison.


Bob Morrison
Wörth am Rhein, Germany
"Luke, use the source!"
BLOG - PHOTOS - Thingiverse
Re: How to chenge the background color when exporting PNGs. by
May 22, 2015 10:32AM
In version 2015.03 go to edit --> preferences --> 3D View
This will list different color options, some with a white background.
Re: How to chenge the background color when exporting PNGs. by
May 22, 2015 11:43AM
None of the options have a WHITE background.
"Tomorrow" has a LIGHT GREY background.

So I copied "Tomorrow" to "Tomorrow-Day" and changed the background to WHITE (attached).

It is easy to do, just go to your color-schemes\render directory (for me this was "c:\Program Files\OpenSCAD\color-schemes\render") and then copy the theme closest to what you want to a new name then EDIT the file and change the "name" to the "NEW NAME" and the "background" to "#ffffff". Save the file, restart OpenSCAD and select your new color scheme.


Bob Morrison
Wörth am Rhein, Germany
"Luke, use the source!"
BLOG - PHOTOS - Thingiverse
Attachments:
open | download - tomorrow-day.json (522 bytes)
Re: How to chenge the background color when exporting PNGs. by
May 23, 2015 01:08AM
Thank you very much for your help guys. But I belive I didn't made myself clear.
I'm not using the graphical user interface but the COMMAND LINE

oepnscad.exe "C:\Users\ale\iphone6Dec"scad -o "C:\Users\iphone6Dec_tdg2hliiF1_View.png" --camea=0,0,0,0,0,0,200 --imgsize=188,368

Now after exceuting this i get this result. I want the yellowish to be white on the COMMAND LINE export



Re: How to chenge the background color when exporting PNGs. by
May 25, 2015 07:53AM
Quote
loskiorama
Thank you very much for your help guys. But I belive I didn't made myself clear.
I'm not using the graphical user interface but the COMMAND LINE

oepnscad.exe "C:\Users\ale\iphone6Dec"scad -o "C:\Users\iphone6Dec_tdg2hliiF1_View.png" --camea=0,0,0,0,0,0,200 --imgsize=188,368

Now after exceuting this i get this result. I want the yellowish to be white on the COMMAND LINE export



as far as i know there isn't actually a way of specifying the background color via the command-line which is a bit of pain , i'm currently looking at using image magik or the previously mentioned xnconvert to fix the problem ,




-=( blog )=- -=( thingiverse )=- -=( 3Dindustries )=- -=( Aluhotend - mostly metal hotend)=--=( Facebook )=-



Re: How to chenge the background color when exporting PNGs. by
June 01, 2015 09:48AM
AFTER defining your new render color scheme ("Tomorrow-Day" in my case) then add "--colorscheme=Tomorrow-Day" to your parameters for the OpenSCAD.exe!

Edited 2 time(s). Last edit at 06/01/2015 12:11PM by rhmorrison.


Bob Morrison
Wörth am Rhein, Germany
"Luke, use the source!"
BLOG - PHOTOS - Thingiverse
Sorry, only registered users may post in this forum.

Click here to login