Posts Tagged: problem

Mount a VHD or VDI in Linux with vdfuse

My old post on mounting VHDs in Linux is rather outdated. I don’t think it even works anymore. So revisiting this on a newer Ubuntu version now. These instructions are for Ubuntu 14.04, so for other OS installs. You’ll also need your compiler installed, so you may need to run sudo apt-get install build-essential to get them before proceeding.

Continue reading

Rounded Corner Script

Script Download: (v2)

Ever wanted a script that would round the corners of images for you?  Well, if you said yes, I wrote myself a bash script to do just that.  As of this post it can do the following: round of corners of images and it can also add a glass-bubble effect as described in the ImageMagick tutorials.  You can specify the border radius and a background color, which is handy if you are making JPEGs.  The script’s help screen is shown below, as well as a couple of samples.  Radius sizes are in pixels.

./ <inputfile> <outputfile> [options]
  -m   Method [plain or glass-bubble]
  -r   Corner Radius
  -b   Background Color
Method can be plain or glass-bubble at the moment. (default: plain)
Radius specifies the radius of the rounded corners. (default: 15)

Note: This should be able to function as filter command, so if you wanted
rounded thumbnails of a particular size you can:
convert <bigfile> -resize 200x200 png:- | ./ png:- smallrounded.png" 1>&2

Get the Bounding Box of an SVG Path

There may be times you need to find the bounding box of an SVG path. One way to find it would be to parse the path and then apply any group transformation on it to find the range of X and Y coordinates the object occupies. However that’s a bit of code, and I’m quite a bit lazy, so I decided to try another approach: rasterize the path object by itself and find where in the image it was drawn.
Continue reading