Quil: Don't even open the window - clojure

I'm trying to use quil to procedurally generate images. I think it's really great, but I'm not trying to display the image at all. I'm just trying to save the image to a file.
Is it possible to not actually open the window and just save the file directly?

Related

C++ displaying an image with SDL2 with different formats than .bmp

I am trying to display an image in SDL2 and the only guide I found was a guide about how to display a .bmp image. What I would like to do is displaying an image or setting a temporary image as a background. For example if I press LEFT_KEY the program should proceed to the next image. Any relevant guides or any examples you can share? It is not needed to set the image as a background (stretched), my goal is to display an image and being able to scroll through other images by pressing a key.
Use SDL_Image:
https://www.libsdl.org/projects/SDL_image/
Example:
Loading PNGs with SDL_image

Passing in-memory bitmap to Powerpoint using wxAutomationObject?

I want to insert pictures in a PowerPoint slide. I've saved bitmap to the disk and called Add_Picture to insert picture, it is working properly.
What I want is without saving bitmap to the disk, add a picture in a PowerPoint slide.
Currently, i'm passing the picture to the clipboard and called the method Paste to do that.
Is there any better alternative solutions?
Did you look at the OLE Automation?
Keep in mind though that this solution will not be portable - Windows only.

Qt rendering an image and showing it

I have a small app that renders an image. It's in .ppm format and opens nicely in Mac's Xee image viewer. The image is created in the default project folder.
However, the user doesn't know where the image is after it is rendered and I would like to open it automatically or perhaps offer where to save the image before it is created.
That is the first problem. The second problem is .ppm - it's not opened by default on Windows, you need Irfan Viewer or something alike.
Is there a way to solve both those problems easily in Qt? For instance, the image is created where the user wants and my app displays it in that ppm format without using some other software? And If a user wants to reopen the image, I should probably make it possible, as well.
I am not a Qt, nor a C++ developer so I am struggling a bit with this, but I have to do it.
Thanks in advance for the tips and advices.
If you convert your image to a QImage (if it's not one already), you can specify where and in what format to save it when calling the QImage::save method.

C++ save image as SVG

I have to save my chart as SVG file (my enviroment C++, eclipse C/C++, windows 7).
I'm able to save it as image file (as you can see bellow), but it's not enough.
I've tried:
gnuplot (gnuplot_i.hpp): don't know how to save the image as SVG file
simple-svg: don't know how not to show black points
cairo: i'm not able to use it at all
Could you recommend me some light and easy-to-understand-and-install tool which helps me to draw charts in C++ and save it directly as SVG file (so nothing like jpg2svg convertor:-)?
I know in command-line gnuplot, it is possible to save a plot as a SVG by doing:
> set term svg
> plot ...
Looking over gnuplot_i.hpp, I would suggest trying:
Gnuplot myGP;
myGP.set_terminal_std("svg");
myGP.setGNUPlotPath("/your/path/here");
myGP.showonscreen();
While I haven't tested it (and there may be more complexity in the Gnuplot class than I can see from the header file), the general idea is there. Set the terminal to svg, set the output path, and plot.
How exactly do you obtain that image? Is there something specific to it that prevents you from just fprintf-ing the image, since SVG is an XML (text) file format?

Newbie: Minimal program to display a PNG in a window

All,
I must have a fundamental neuron missing, but I cannot get a simple program to load a PNG file and display it in a window. I'm not sure if it is a QPixmap, a QPicture, or what. All of the samples in the QTCreator are a bit more than I need right now. Baby steps...
I can get the window to display, and the program doesn't barf when I try to load the PNG, but it never gets displayed.
If someone would post a simple program to load a PNG from a file and display it, it would greatly appreciated. (I know, asking a lot, but...).
Thanks!
:bp:
this example is minimal: http://doc.trolltech.com/4.6/widgets-imageviewer.html
You will want to have a look at the function ImageViewer::open():
Build a QImage object from a filename;
Convert your QImage to a QPixmap with QPixmap::fromImage();
Put your QPixmap in a QLabel with QLabel::setPixmap().
The QImage object will automatically chose an appropriate reader according to the format of the image it detects in step 1.