• Walking for a cause; please sponsor me

    It seems that many charities have walks, runs, etc. to raise money and awareness for their cause. The MS (Multiple Sclerosis) Society is no different. Last year my wife decided to walk in the MS Challenge Walk, a 3-day, 50 mile walk. For her, this walk was very personal as her mother (my mother-in-law) has had MS for many years.

    At the end of the walk last year, my wife said she wanted to do it again this year as she had a great experience and wanted to know if I'd walk with her. Of course, I'd walk with her and support her (and the MS Society). So now the begging, pleading, and hitting up everyone I know begins. In order to participate in the walk, I have to raise $2500 by September. I'm not one to go knocking on doors asking for money, but I'm going to knock on your virtual door.

    Most people have charities that he or she donates to each year. If you're one of those people and don't normally donate to the MS Society, please consider diverting a small amount of your yearly donation to help sponsor me for the walk.

    All you have to do is visit my personal donation page and make a donation. If you work for a company that matches your donation, don't forget to find your company at the bottom of the donation page.

    Like the famous people that host telethons say, "every dollar counts". Please help me reach my goal.

  • Another advantage of VoIP

    When we switched to Ooma awhile back, I had in the back of my mind that someday we'd move and be able to take our phone number with us. I didn't realize it would be so soon, but with this move, transferring our phone was one of the easiest tasks. I just unplugged the box, took it to the new house and plugged it in. Once the cable modem was connected, the phone worked. I just had to update our service address in Ooma for 911 service and I was in business again.

    This is, yet another, reason that I really like Ooma. We've saved a ton of money, we have 2 lines, get voicemail sent as email, and I can quickly block telemarketers via the web interface.

  • Removing geotagged info from a video

    When I post pictures to eBay or somewhere else that I've taken at my house, I strip the geotagged information in it as I'm a bit paranoid. I wrote a small app which basically does this for JPG images. The core of the app is below.

    However, how do you do this with videos as the iPhone geotags video? At first I tried emailing the video and then exporting it via QuickTime Player to 480p format. That didn't seem to work as I think it was already 480p and therefore didn't convert. Next, I imported the video into iPhoto, dragged it out to the desktop, opened it up in QuickTime Player and then exported to 480p. Since the initial video was 1080p, QuickTime Player actually had to do a conversion and the process stripped the geotagging info.

    I'm sure I could have written an app to do this, but I haven't played around enough lately with the QuickTime APIs to know how to do this.

    The source code below is © 2011 Scott Gruby. Redistribution in source or object form is permitted granted that attribution is given to me.

    - (void) processFile:(NSString *) inPath
    {
        NSString *extension = [inPath pathExtension];
        if ([extension caseInsensitiveCompare:@"jpg"] == NSOrderedSame || [extension caseInsensitiveCompare:@"jpeg"] == NSOrderedSame)
        {
            NSURL *pictURL = [NSURL fileURLWithPath:inPath];
            CGImageSourceRef sourceRef = CGImageSourceCreateWithURL((CFURLRef) pictURL, NULL);
            if (sourceRef)
            {
                NSDictionary* metadata = (NSDictionary *)CGImageSourceCopyPropertiesAtIndex(sourceRef,0,NULL);
                NSMutableDictionary *metadataAsMutable = [[metadata mutableCopy] autorelease];
                
                
                [metadataAsMutable setObject:(id)kCFNull forKey:(NSString *)kCGImagePropertyGPSDictionary];
                [metadataAsMutable setObject:(id)kCFNull forKey:(NSString *)kCGImagePropertyIPTCDictionary];
    
                CFStringRef UTI = CGImageSourceGetType(sourceRef); //this is the type of image (e.g., public.jpeg)
                
                //this will be the data CGImageDestinationRef will write into
                NSMutableData *data = [NSMutableData data];
                
                CGImageDestinationRef destination = CGImageDestinationCreateWithData((CFMutableDataRef)data,UTI,1,NULL);
                
                if(destination)
                {
                    //add the image contained in the image source to the destination, overiding the old metadata with our modified metadata
                    CGImageDestinationAddImageFromSource(destination,sourceRef,0, (CFDictionaryRef) metadataAsMutable);
                    
                    //tell the destination to write the image data and metadata into our data object.
                    //It will return false if something goes wrong
                    BOOL success = NO;
                    success = CGImageDestinationFinalize(destination);
                    
                    if (success)
                    {
                        //now we have the data ready to go, so do whatever you want with it
                        //here we just write it to disk at the same path we were passed
                        success = [data writeToURL:pictURL atomically:YES];
                    }
                    CFRelease(destination);
                }
    
    
                [metadata release];
                CFRelease(sourceRef);
            }
        }
    }
    
  • Beat this, Lassie

    The other day our dog came into the house and my wife asked me if I let him in; I replied that I hadn't. We scratched our heads and then figured that the dog opened the screen door and walked in. This is something we've wanted the dog to do for years so we wouldn't have to let him out (our doggie door in our last house was a piece of junk and fell apart requiring me to replace the door before we sold the house).