Aloha Friday: Teaching Kids About Computers

Computers are very important to me.  After all, I work as a webmaster so I’m around computers all day.  When I heard that NHL’s school wasn’t *really* teaching him about computers, but only letting them go online to visit some kid-oriented websites, I decided that *someone* had to teach him about computers.  After all, computers are important in today’s society.  A computer-literate child has more opportunities than a computer-illiterate one.  I quickly decided that I should have semi-regular computer lessons with NHL. » Read more

Doing Some Magick with Photos

If you’ve checked out any of the (many) photos I’ve posted, you might have noticed that I watermark my photos. It’s subtle, but in the bottom right hand corner of every photo it says “”.

[thumb id=”1154″]

Why do I do this? Well, as much as I’d like to assume that people are good, there are a lot of unscrupulous people out there that will grab photos off the Internet for their own use. By watermarking the photo, I’m decreasing its value to these people. (Yes, the watermark could be removed, but it’d take time and effort to do so. The photo thieves are more likely to just head elsewhere to grab some photos.)

In addition to the watermarking, I also rotate some photos (depending on which way they were taken) and resize them for the web. Unfortunately, when I have a lot of photos to process, this can be a time-consuming pain. Initially, my process looked like this:

  1. Load one photo in Irfanview
  2. Open up Irfanview’s Thumbnail mode
  3. Select all images to process
  4. Use Irfanview’s lossless-JPEG rotate function to auto-rotate all photos
  5. Open up Irfanview’s Batch Conversion mode
  6. Select all photos to process and conversion settings (e.g. new height/width)
  7. Wait until Batch Conversion is done.
  8. Open up Picture Shark.
  9. Select All Photos
  10. Select Watermark
  11. Wait until watermark is applied to all photos
  12. Post photos

You can see how this would make photo posting a pain, but each step was necessary. I couldn’t post sideways photos and couldn’t post full-res pictures either. There’s the download time issue as well as the aforementioned picture thieves.

That’s when I remembered about ImageMagick. ImageMagick is a freeware photo manipulation program that is often used on servers to, well, manipulate images. My server, for example, uses it to make thumbnails out of the photos I upload. The only problem is that ImageMagick doesn’t have an graphical interface. It is run by a series of command line statements. This is perfectly fine for a script running on a server, but not as good for a human user.

Since all I wanted to do was run the same commands over and over, and since I know how to program, I wrote a Photo Processor script. It would let me specify the directory that the photos were in, whether I wanted them resized/rotated/watermarked and even allowed me to select which watermark. This way, B could use the same script for My new photo processing process was:

  1. Run Script
  2. Copy/Paste name of directory with photos
  3. Answer dialogs for resizing/rotating/watermarking photos.
  4. Wait until script finishes
  5. Post photos

Much easier, right?

When Monkey was born to Tarzan and Jane over at HisBoysCanSwim, I noticed that their photos of Monkey merely had some text at the bottom of them. This would be easily stripped out by a picture thief so I offered my Photo Processor script. And while I was working on it, I figured I’d post a version for everyone else out there.

The first thing you’ll need to do is install a copy of ImageMagick on your PC. In the configuration screen during setup (the one with all of the checkboxes), make sure that you check the box for “Install ImageMagickObject OLE Control for VBScript, Visual Basic, and WSH.” (See image below.)

[thumb id=”1167″]

Once that is done, download my Photo Processor script. When you run the script, first you’ll need to enter the directory of the photos to be processed (e.g. C:\Photos\My Trip To The Beach\). Don’t worry if they’re your originals, the altered versions will be saved in newly created subdirectories. After you enter the directory, simply answer a few Yes/No questions to set whether the photos are rotated and/or resized and sit back and wait for the script to do its job. To add a watermark, put a PNG image in the same directory as the script and name it “Watermark.png.”

If you have any questions about this script, feel free to post them in the comments below.

How The “Don’t Click” Twitter Hack Works

I began to see "Don’t Click" posts appearing in my Twhirl client from a few different users. Then came the warnings not to click the links in those tweets as that would tweet a "Don’t Click" from my own account. Being curious (and careful), I decided to figure out how this could work. First, I would like to recommend that you don’t follow my steps unless you know what you’re doing. This instance is relatively benign (annoying, but benign) the next instance could result in virus/trojan infestation.

After finding one of the "Don’t Click" links, I disabled JavaScript within Firefox. I was reasonably confident that this would prevent anything from running automatically. Next, I opened the link. Sure enough, a page opened up with a "Click Here" button. Next, I examined the source code but didn’t see anything that would automatically post the tweet. It did notice an iFrame loading with a premade Tweet just as thinkgeek mentioned.  I didn’t see how it would post the message to your tweet-stream, however.

At the bottom of the page was a credit for the source of the code so (keeping JavaScript disabled), I decided to follow the link.  That turned out to be a blog post written in French.  A quick trip to Babelfish later, and I was able to read the blog post.  The translation wasn’t perfect, but it was good enough.  So here’s how it goes:

  1. You see "Don’t Click" posted by one of your Twitter Friends.  Being the curious sort, you click on the link.
  2. The page that loads contains an iFrame.  This iFrame loads up with another "Don’t Click" message pre-filled out.  So far, this isn’t a threat of any kind.  Websites can do this all they want, they just can’t interact with the contents of the iFrame (beyond loading up completely new contents).  The website doesn’t have access to your Twitter Username or Password.
  3. The iFrame is set via CSS to be transparent.  This means that it’s there and clickable, but you don’t actually see it.
  4. A "Click Here" button is shown and positioned (via CSS) right where the page’s submit button is.
  5. You, again being the curious sort, try to click the "Click Here" button.
  6. Instead of clicking "Click Here", your browser clicks on the Twitter Submit button (located on top of the Click Here button but invisible to you).
  7. Twitter posts a "Don’t Click" message in your name.

It is quite clever, but it still requires two user actions.  First, you need to click on the "Don’t Click" link.  Next, you need to click on the "Click Here" button.  This whole hack wouldn’t work if didn’t support pre-filling out messages, but those pre-filled out messages can come in handy from time to time.  So what can Twitter do to prevent this?  To be honest, I don’t know.  They’ve said that they’re working on it, but (short of removing the "pre-filled message" functionality), this prank uses standard HTML/CSS conventions.  For now, though, the easiest way to prevent this is not to click on those links or, if you do, don’t click on the second link.

Update:  I actually did just think of something Twitter could do to stop this.  The Don’t Click pranksters can’t see what’s going on when they attempt to get their tweet sent under their victim’s name.  Twitter, however, can detect that a pre-filled out message is about to be sent and can pop-up a JavaScript prompt confirming the submission.  The pranksters won’t be able to click on the "Ok, submit this" button in a JavaScript prompt and the potential victim will (hopefully) cancel the message and leave.

A Green Tip For You – Receipt Printing

I was speaking to a coworker and mentioned something I do with receipts from online purchases.  He seemed to think that it was a great idea.  It just seemed so second nature to me that I didn’t even realize that people might not know about it.  Given that this holiday season brings many online purchases, I figured that it would be a good tip to share.  (Ok, most of you have probably bought everything you’re going to buy online for the holiday season, humor me on this point, ok?  )

What you will need:

  • PDFCreator – PDFCreator is a free, open-source application that can create PDF files from any file that you can print.  It fools your system into thinking that there is printer called PDFCreator.  When documents (Word files, web pages, photos, etc) are printed to this "printer", they don’t emerge on paper but are saved to a PDF file.  Since it is free, you can install it on all of your computers without paying a single penny.

The Green Tip:

Upon completing an online purchase, you’ll usually be presented with a receipt for your purchase.  Many would print this receipt out to have onhand in case they need it, but this can waste paper.  Instead, I print the receipt to PDF.  To make it easier to find, I put all of my receipts in a folder (appropriately called "Receipts") and name the PDF files in a way that I’ll remember what they were for.  e.g. "2008-12-23 – – Another Good Book.pdf"  Then, if I ever need to find my receipt, I simply open the cooresponding PDF file.  I haven’t yet needed to print a receipt out, but if I need to, they’ll all be there as good as new while a receipt printed at the time of sale can fade, tear, or get lost.  I don’t know offhand how many trees I’ve saved by not printing out my receipts, but every little bit counts.

1 4 5 6