PNG files

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

PNG files

ShinRevolver
Hi,

Has anyone here used pngwriter? Its a library that creates a .png file. I trying to add it as a library to see if I can save any drawing as a .png file. Its mainly a school project. Any tips? I'm new here. Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: PNG files

sp1der
LibreCAD can already save a drawing to a .png format, is this no good for you?
Reply | Threaded
Open this post in threaded view
|

Re: PNG files

ShinRevolver
Oh. Snap. Scratch that idea. Know any simple ones that I can implement? I would greatly appreciate it.
Reply | Threaded
Open this post in threaded view
|

Re: PNG files

dxli
It may work, to create your own painter class similar to RS_Painter.

You need to replace all drawing methods there (RS_Painter) to use pngwriter.

It sounds quite lots of work.
Reply | Threaded
Open this post in threaded view
|

Re: PNG files

ShinRevolver
I'll look into it. Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: PNG files

ShinRevolver
In reply to this post by dxli
Can you tell me where the code for the export of features(to png, to jpeg, etc.) is located? I can't seem to locate it. Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: PNG files

dxli
void QC_ApplicationWindow::slotFileExport() ;
Reply | Threaded
Open this post in threaded view
|

Re: PNG files

ShinRevolver
Thanks. This is in terms of the UI, if I'm not mistaken. Where do you put the code in order for it to create the file(i.e png, jpeg, etc.)?
Reply | Threaded
Open this post in threaded view
|

Re: PNG files

dxli
the code to generate an image file in line 3249,

        if (iio.write(img)) {
            ret = true;
        }
Reply | Threaded
Open this post in threaded view
|

Re: PNG files

ShinRevolver
Thanks.