Export image to file?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Export image to file?

Scalpel78
Hi, I'm trying to export an image from OpenSCAD to file.

Using the commandline options I've executed this:

"%PROGRAMFILES%\OpenSCAD\Openscad.com" -o ballbearing.jpg --imgsize=256,256 --preview ballbearing.scad

The only thing that happens is that OpenSCAD displays the usage text. No information about what is missing, or what it doesn't understand.

What am I doing wrong?
Reply | Threaded
Open this post in threaded view
|

Re: Export image to file?

Miro Hrončok
I guess you have to use filename with .png extension. That way
OpenSCAD recognizes you want an image (it does not AFAIK support JPEG
images)
Miro Hrončok

Telefon: +420777974800


2014-12-30 11:30 GMT+01:00 Scalpel78 <[hidden email]>:

> Hi, I'm trying to export an image from OpenSCAD to file.
>
> Using the commandline options I've executed this:
>
> "%PROGRAMFILES%\OpenSCAD\Openscad.com" -o ballbearing.jpg --imgsize=256,256
> --preview ballbearing.scad
>
> The only thing that happens is that OpenSCAD displays the usage text. No
> information about what is missing, or what it doesn't understand.
>
> What am I doing wrong?
>
>
>
> --
> View this message in context: http://forum.openscad.org/Export-image-to-file-tp10806.html
> Sent from the OpenSCAD mailing list archive at Nabble.com.
>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Export image to file?

jon_bondy
If OpenSCAD does not support JPG, does it emit an error message somewhere?

On 12/30/2014 7:14 AM, Miro Hrončok wrote:

> I guess you have to use filename with .png extension. That way
> OpenSCAD recognizes you want an image (it does not AFAIK support JPEG
> images)
> Miro Hrončok
>
> Telefon: +420777974800
>
>
> 2014-12-30 11:30 GMT+01:00 Scalpel78 <[hidden email]>:
>> Hi, I'm trying to export an image from OpenSCAD to file.
>>
>> Using the commandline options I've executed this:
>>
>> "%PROGRAMFILES%\OpenSCAD\Openscad.com" -o ballbearing.jpg --imgsize=256,256
>> --preview ballbearing.scad
>>
>> The only thing that happens is that OpenSCAD displays the usage text. No
>> information about what is missing, or what it doesn't understand.
>>
>> What am I doing wrong?
>>
>>
>>
>> --
>> View this message in context: http://forum.openscad.org/Export-image-to-file-tp10806.html
>> Sent from the OpenSCAD mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> OpenSCAD mailing list
>> [hidden email]
>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2015.0.5577 / Virus Database: 4257/8837 - Release Date: 12/30/14


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Export image to file?

Miro Hrončok
Don't know, this was just a wild guess.
Miro Hrončok

Telefon: +420777974800


2014-12-30 13:59 GMT+01:00 jon <[hidden email]>:

> If OpenSCAD does not support JPG, does it emit an error message somewhere?
>
>
> On 12/30/2014 7:14 AM, Miro Hrončok wrote:
>>
>> I guess you have to use filename with .png extension. That way
>> OpenSCAD recognizes you want an image (it does not AFAIK support JPEG
>> images)
>> Miro Hrončok
>>
>> Telefon: +420777974800
>>
>>
>> 2014-12-30 11:30 GMT+01:00 Scalpel78 <[hidden email]>:
>>>
>>> Hi, I'm trying to export an image from OpenSCAD to file.
>>>
>>> Using the commandline options I've executed this:
>>>
>>> "%PROGRAMFILES%\OpenSCAD\Openscad.com" -o ballbearing.jpg
>>> --imgsize=256,256
>>> --preview ballbearing.scad
>>>
>>> The only thing that happens is that OpenSCAD displays the usage text. No
>>> information about what is missing, or what it doesn't understand.
>>>
>>> What am I doing wrong?
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://forum.openscad.org/Export-image-to-file-tp10806.html
>>> Sent from the OpenSCAD mailing list archive at Nabble.com.
>>>
>>> _______________________________________________
>>> OpenSCAD mailing list
>>> [hidden email]
>>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>>
>> _______________________________________________
>> OpenSCAD mailing list
>> [hidden email]
>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>>
>>
>> -----
>> No virus found in this message.
>> Checked by AVG - www.avg.com
>> Version: 2015.0.5577 / Virus Database: 4257/8837 - Release Date: 12/30/14
>
>
>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
tp3
Reply | Threaded
Open this post in threaded view
|

Re: Export image to file?

tp3
In reply to this post by jon_bondy
On 12/30/2014 01:59 PM, jon wrote:
> If OpenSCAD does not support JPG, does it emit an error message somewhere?
>
$ ./openscad -o /tmp/qqq.jpg csg.scad
Unknown suffix for output file /tmp/qqq.jpg


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
-- Torsten
Reply | Threaded
Open this post in threaded view
|

Re: Export image to file?

Scalpel78
The problem seems to be the --preview argument. It expects either --preview=false or --preview=true. When just calling --preview it fails without a useful error message.
Reply | Threaded
Open this post in threaded view
|

Re: Export image to file?

kintel
Administrator
On Dec 30, 2014, at 11:37 AM, Scalpel78 <[hidden email]> wrote:

> The problem seems to be the --preview argument.

Yes, the problem is that the preview parameter takes an optional parameter, i.e. --preview or —preview=throwntogether.
Since we don’t actually have a way determining the absence of a parameter unless the —preview options comes last, this may fail.

Workaround: Always pass the preview option _after_ the main .scad file on the cmd-line.

Not sure how easy it would be to fix this.

 -Marius


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org