Login  Register

PNG files

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

PNG files

ShinRevolver
9 posts
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
| More
Print post
Permalink

Re: PNG files

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

Re: PNG files

ShinRevolver
9 posts
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
| More
Print post
Permalink

Re: PNG files

dxli
2003 posts
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
| More
Print post
Permalink

Re: PNG files

ShinRevolver
9 posts
I'll look into it. Thanks.
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: PNG files

ShinRevolver
9 posts
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
| More
Print post
Permalink

Re: PNG files

dxli
2003 posts
void QC_ApplicationWindow::slotFileExport() ;
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: PNG files

ShinRevolver
9 posts
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
| More
Print post
Permalink

Re: PNG files

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

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

Re: PNG files

ShinRevolver
9 posts
Thanks.