A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.

Jump to

Quick reference

Showing posts with label image. Show all posts
Showing posts with label image. Show all posts

iPhone: No new pictures or videos were found on this device

(Windows) Sometimes photos get "stuck" on the iPhone, and the usual method of right-clicking on the iPhone in My Computer and importing doesn't work. It errors: "No new pictures or videos were found on this device".

The fix is to rename the file C:\Users\[username]\AppData\Local\Microsoft\Photo Acquisition\PreviouslyAcquired.db

NOTE: AppData will probably be hidden - you must make hidden files and folders visible in Windows Explorer options.

(source)

Comparison of private image hosting

  • Facebook - Private albums, but I never quite trust them with my privacy. Interface is tedious and buggy to use. Not geared towards organising lots of images. Upload limit not advertised.
  • Photobucket - Private or password protected albums. Interface is not great as it squashes your thumbnails, has adverts and only shows a few images each page (mobile). 10Gb free, $30/year for 20Gb, more storage available.
  • Flickr - 1Tb free. Pictures can be private, or shared with family. For pictures, this is very good. Uploaded video quality can be poor. Interface is great for uploading and organising many thousands of photos and video.
  • SmugMug - $40/year for unlimited uploads. Advanced privacy/sharing system. They've put a lot of effort into it.
I recommend Flickr.

Working with PDFs on Linux

Combine several PDFs into one:

pdfunite in-1.pdf in-2.pdf in-n.pdf out.pdf

Convert image to PDF:

convert page1.png page2.png mydoc.pdf

Convert PDF to image:

convert foo.pdf foo.png

(source, source, source)

Reduce size of a PDF by converting to high quality images reducing size and rebuilding PDF:

convert -density 150 foo.pdf -quality 100 foo.png
for k in 0 1 2 3 4; do convert "foo-"$k".jpg" -resize '75%' "foo_smaller"$k".jpg"; done
convert foo_smaller* foo_smaller.pdf

(source, source, source)

Make all the pages of the PDF the same size:

mogrify -resize x1000 *.jpg
for i in *.jpg; do convert -density x1000 -units PixelsPerInch ${i} ${i}; done
convert *.jpg result.pdf


More tricks:

convert -background white -page a4 -density 150 -quality 80 -compress jpeg *.jpg result.pdf

Automatically generated diagrams of Perl code


  • Use UML::Sequence to diagram your method calls - Looks cool but couldn't get the module's tests to pass.
  • Write your own code to produce a Graphviz spec file - Good choice if you want a data structure diagrammed, e.g. State transitions.
  • SchemaSpy works well for database tables.
Untried:
  • UML::Class::Simple - class diagrams, not methods?
  • Devel::Diagram - class diagrams, not methods?
  • Devel::DProfPP