convert $inputjpeg -resize 25% -quality 75% $outputjpeg
notolog
A repository of notes; by noto, for noto. Made public so noto can read it from anywhere. It won't make any sense to you.
Sunday, December 21, 2014
How to resize and/or reduce image file size of a JPEG
Monday, October 21, 2013
Create an animated .gif from existing images using the Gimp
- Open as Layers. In the open dialog, select the images that will become the frames of the animation
- Export as .gif
Tuesday, September 24, 2013
Wednesday, January 23, 2013
Creating a PEM format ssh credentials file
ssh-keygen
openssl rsa -in ./id_rsa -outform pem > ./id_rsa.pem
Monday, December 17, 2012
PAM: a simple RGB+ALPHA file format
pamtotiff
.
#includeint main() { printf("P7\n"); printf("WIDTH 256\n"); printf("HEIGHT 256\n"); printf("DEPTH 4\n"); printf("MAXVAL 255\n"); printf("TUPLTYPE RGB_ALPHA\n"); printf("ENDHDR\n"); unsigned int row,col; for (row=0; row<256; row++) { for (col=0; col<256; col++) { printf("%c", (char)col); // RED printf("%c", (char)(255-col)); // GREEN printf("%c", (char)row); // BLUE printf("%c", (char)(255-row)); // OPACITY }} return 0; }
Tuesday, November 20, 2012
Changing the location specified by java.io.tmpdir before running a Java program
java.io.tmpdir
is hard-coded to /tmp
/. This can be changed with, e.g.:
export _JAVA_OPTIONS=-Djava.io.tmpdir=/mnt/tmp/whatever
Wednesday, September 5, 2012
Change a running process to nohup
- put the process in the background (CTRL-Z)
- make sure it's still running though (bg)
- run
disown -h
This doesn't really change to nohup, but it does prevent the job from receiving the SIGHUP signal when you exit the shell. Use the -a
option to affect all jobs.
According to http://linux.about.com/library/cmd/blcmdl1_disown.htm:
disown [-ar] [-h] [jobspec ...]
Without options, each jobspec is removed from the table of active jobs. If the -h option is given, each jobspec is not removed from the table, but is marked so that SIGHUP is not sent to the job if the shell receives a SIGHUP. If no jobspec is present, and neither the -a nor the -r option is supplied, the current job is used. If no jobspec is supplied, the -a option means to remove or mark all jobs; the -r option without a jobspec argument restricts operation to running jobs. The return value is 0 unless a jobspec does not specify a valid job.