I have this program which draws the Mandelbrot sets onto a canvas, and even does some creative things with the concept of it. I want this program to automatically save this canvas to my downloads folder once it's done as a .PNG file. I tried looking around this website for some help and the best thing I was able to find and somewhat understand enough to apply to my program is this:  var image = c.toDataURL("image/png").replace("image/png", "image/octet-stream"); window.location.href = image;   Where 'c' is the canvas. While this does save the image to my downloads folder, it doesn't actually store it as a PNG file. As far as I'm able to grasp it doesn't specify a filetype at all since properties of these files tell me the filetype is 'Bestand' which I'm sure is just the Dutch translation for 'file'. Does anyone know how to directly store this as a PNG file? Note: I tried opening the images in Paint and that does seem to be able to read the file. It seems to me the image is correctly saved but no filetype is specified, nor is a name of the file given at all.
33333
If for example you follow the link:  data:application/octet-stream;base64,SGVsbG8=  The browser will prompt you to download a file consisting of the data held as base64 in the hyperlink itself.  Is there any way of suggesting a default name in the markup?  If not, is there a JavaScript solution?
123938
I want to read an image into MATLAB, draw a rectangle on it, and then save the image.  Also, I'm just learning MATLAB--please be gentle. It seems like it should be simple, but I can't seem to do it.  im = imread('image.tif'); imshow(im); rectangle('Position', [100, 100, 10, 10]); imwrite(im, 'image2.tif');   Even though I can see the rectangle on the image, the saved image does not display the rectangle. How can I save the image and have the rectangle show up?  FWIW, I've already tried saveas(), but that gives me a HUGE image. Is there a way to use saveas() and make the saved image the correct size?
93609
Hey having some trouble trying to maintain transparency on a png when i create a thumbnail from it, anyone any experience with this? any help would be great, here's what i am currently doing:  $fileName= "../js/ajaxupload/tees/".$fileName;  list($width, $height) = getimagesize($fileName);  $newwidth = 257; $newheight = 197;  $thumb = imagecreatetruecolor($newwidth, $newheight); imagealphablending($thumb, true); $source = imagecreatefrompng($fileName); imagealphablending($source, true);  imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);  imagesavealpha($thumb, true); imagepng($thumb,$newFilename);
97322
I want to download the images shown in a web page, for example , (the ones under the All Artworks tab), and store them in a folder (e.g. /home/boomer/GH/A_nou/).  How can I achieve this?  I can use wget or curl for that, but sadly I have no idea of what to do with them.  Also I don't want the intermediate images, (banners, logos, etc.), only full size images for everything under the artwork section.
101378
Blender has a very irritating quirk in which it fails to save an image that you have painted on, when the .blend is saved. To fix this you have to remember to use "save as image", before you save the .blend. Is there anyway to automatically save the image when saving the .blend?  P.S.  A script free solution(or a script that runs whenever I save, no matter which button/keyboard short cut.)would be of great value!
31228
How can I fetch images from a server?  I've got this bit of code which allows me to draw some images on a canvas.  &lt;html&gt;   &lt;head&gt;     &lt;script type="text/javascript"&gt;       function draw(){         var canvas = document.getElementById('canv');         var ctx = canvas.getContext('2d');          for (i=0;i&lt;document.images.length;i++){           ctx.drawImage(document.images[i],i*150,i*130);         }     }     &lt;/script&gt;   &lt;/head&gt;   &lt;body onload="draw();"&gt;     &lt;canvas id="canv" width="1024" height="1024"&gt;&lt;/canvas&gt;     &lt;img src="http://www.google.com/intl/en_ALL/images/logo.gif"&gt;     &lt;img src="http://l.yimg.com/a/i/ww/beta/y3.gif"&gt;     &lt;img src="http://static.ak.fbcdn.net/images/welcome/welcome_page_map.png"&gt;   &lt;/body&gt; &lt;/html&gt;   Instead of looping over document.images, i would like to continually fetch images from a server.  for (;;) {     /* how to fetch myimage??? */     myimage = fetch???('http://myserver/nextimage.cgi');     ctx.drawImage(myimage, x, y); }
72820
It's very easy to mark an image file to become an embedded resource however how does one access the image thereafter. Please can I have some example code?
31098
I have tried  \includegraphics{http://www.site.com/path/to/figure.png}   But this returns the error   ERROR: Package pdftex.def Error: File `http://www.website.com/path/to/figure.png' not found.    Are there other options?
102720
For the graphicx package, we can use \graphicspath{...} so that we can directly use filenames in the argument of \includegraphics{...}. Can a similar thing be done for directly using filenames in \input{...}. I know of the method mentioned  but if this was the way to do it, then why does \graphicspath{...} exist?
15052
There several types of graphics files. In no particular order .jpeg .eps .pdf .png .tif .jif (and no doubt others). Some work with latex, dvips and some work with pdflatex. How am I supposed to know which?  Just to confuse matters, metapost produces .eps but I can use these with pdflatex as long as I put in a four line incantation.  Can anyone explain this?
101635
The size of the file is 168mb and it's nearly impossible to work on the file because every action takes like five minutes or so to complete. The artwork is of a scene filled with characters and I so far outlined the entire thing with a brush and afterwards expanded all the strokes thinking it would help ease the load. However, the file is still way too big. Is there something I can do to make it easier to work on the file?  Edit: I flattened transparency and got it reduced to 33mb. Huge difference, but would like it even smaller if possible.
48705
When using 's \includegraphics you can specify the file extension or not. For generic use and perhaps portability, extensions are commonly dropped. The types of "approved" inclusions and their order of precedence depends on the driver/compiler being used. What are these driver-defaults?  Related:
96489
trying to create a launcher with a .png image file and main menu keeps on removing it. is .png not supported or do I need to edit the image first?
96157
I always choose PDF when exporting and usually choose JPG when saving. Being able to change the default format from PNG to either of these would save me a few clicks every time I use Preview. Is there a way? Preview preferences has no save/export format option, and I was unable to find anything on Google.  For bonus points, is there a way to have the default extension for images saved in JPG format with Preview be .jpg instead of .jpeg? It's a pain to change them manually every time, and leaving them means having to remember which files are .jpg (those not from Preview) and which ones are .jpeg (those from Preview) when making websites.  Thanks in advance.
119048
I'm trying to draw images on a C# form (in PictureBoxes, as well as using Graphics.DrawImage()), and am looking for a way to draw them smooth.  The images must be a format that supports transparency, so PNG, GIF, SVG, and WMF.  C# doesn't support SVG files out of the box, and I haven't found a good third-party library to use (I found SvgNet, but couldn't figure it out).  I need to draw a WMF file, which C# can do via the Image.FromFile() function, but it's not anti-aliased.  I was wondering if there's any way to smooth this out?
49466
Is there a way to export my artwork as PDF so that it has a transparent background? Something like exporting objects only... whenever I try to save my .ai as pdf, it always comes with a full white background. If I try to save as eps, I get a chunky white background (where it has white rectangles behind the artwork only where the artwork exists, so there are transparent chunks).  If I export as png, I get an image like what I'm looking for. Is there any way to do that in a vector format?
58401
I recieved a couple of Fireworks PNG files. Fireworks has a special format for saving several source images in layers in the png file.  How can I read these without having Fireworks installed?  (im working on a mac but with vmware so any suggestions whatever platform is appreciated)  EDIT: I'd prefer to get a set of copies out of of the layered png. And I prefer if the export be lossless