Copyright infringement and The Pirate Bay

April 17th, 2009 by Richard No comments »

PiratesLet’s get a few things straight, downloading copyrighted music, software, games and music is NOT theft and it is not a criminal act.  It is a civil act of copyright infringement.  Now that’s out of the way I will also start by saying I do not agree or believe in piracy or copyright infringment in any way, shape or form.

Firstly, today the founders of The Pirate Bay (and I won’t link) have been found guilty of breaking copyright law and sentenced to jail. Now whilst there are lot of torrents on The Pirate Bay that contain copyrighted files that are being shared illegally, none of these files are actually stored by the pirate bay whatsoever.  They are effectually a search engine for .torrent files.

So what does the rulings in the Swedish courts today mean?  Does it mean the fact you can find illegally shared files by Google mean that Google should be shut down?  Of course it would be ludicrous to suggest such a thing, but actually is it?  Google can be used for exactly the same thing as The Pirate Bay can.  Just Google ‘casino royale avi filetype:torrent’ and I can guarantee you’ll be able to find a page with a link to a .torrent download for that movie.

Does this mean that copyright holders shouldn’t protect their property and their rights, no of course they should, I just feel they are going about it the wrong way.

DRM (Digital Rights Management)

I have no problem with DRM until it gets in my way of doing something I want to do with it.  Now this does not mean sharing the files amongst my friends.  It means if I buy something from iTunes (pre music going DRM-free) and I change from an iPod to a Zune then I shouldn’t have to re-buy all my music.  Secondly if I want to archive all my DVD’s for playback on Apple TV and then put my DVD’s in the loft I shouldn’t have to find ways around the insane corruption that Sony puts on it’s DVD’s courtesy of the Arccos software.

For the most part DRM only seeks to annoy legitimate customers, as anyone who truely wants to pirate something, will find a way to do so regardless of how ‘protected’ the studios believe DRM to be… just take a look at how quickly BD+ got cracked.

Pricing

If I want to legitimately purchase a movie from iTunes for example, and let’s take an example of  ‘Max Payne‘, this costs £10.99 from the store. I can buy that same movie from play.com for £12.99.  Heck, when Quantum of Solace came out you could buy it from Tesco for £7, yet it was still £10.99 on iTunes and they won’t even let you buy an HD version!

Can the studios please explain to me how a movie that only has to be digitised once, costs nothing in physical storage in a warehouse, has no manufacturing costs and no distribution/delivery costs can cost only slightly less or indeed even more than it does in a shop?

If they studios want to stop people downloading for free they need to radically reduce the price of legitimately buying a film online.

Software

I can also see the arguement from the angle of the copyright holder, I am a software developer.  I have written and sold software online, only a minority of which are GPL’d.

There is a small subset of people out there that think it is their god-given right to give my software away and use it without me even getting a small amount of money for my efforts in developing it (I’ve never charge mega-bucks for applications, unlike some companies out there).

I do believe that copyright holders have the right to protect their rights, and make a living from it.

If I GPL’d my code and even though I sold it, there is nothing preventing someone else taking my same code and competing with me.  I’m not a Red Hat or a Novell of this world, I can offer the value added benefits of support and protection that they offer.  I wouldn’t be able to make any money from this type of arrangement.

This is why I believe the shared source licenses.  Basically buy the software, get the source, change what you want to in the source, but have no rights to redistribute it without permission.

Some more iPhone SDK tips and tricks

April 8th, 2009 by Richard No comments »

In working on an update to one of my applications on the Apple iPhone I thought I’d share another quick tip.

I found on a blog and it works brilliantly,  to make rounded corners on any UIImage.

ImageManipulator.h

@interface ImageManipulator : NSObject {
}
+(UIImage *)makeRoundCornerImage:(UIImage*)img :( int) cornerWidth :( int) cornerHeight;
@end

ImageManipulator.m

#import "ImageManipulator.h"

@implementation ImageManipulator

static void addRoundedRectToPath(CGContextRef context, CGRect rect, float ovalWidth, float ovalHeight)
{
    float fw, fh;
    if (ovalWidth == 0 || ovalHeight == 0) {
        CGContextAddRect(context, rect);
        return;
    }
    CGContextSaveGState(context);
    CGContextTranslateCTM (context, CGRectGetMinX(rect), CGRectGetMinY(rect));
    CGContextScaleCTM (context, ovalWidth, ovalHeight);
    fw = CGRectGetWidth (rect) / ovalWidth;
    fh = CGRectGetHeight (rect) / ovalHeight;
    CGContextMoveToPoint(context, fw, fh/2);
    CGContextAddArcToPoint(context, fw, fh, fw/2, fh, 1);
    CGContextAddArcToPoint(context, 0, fh, 0, fh/2, 1);
    CGContextAddArcToPoint(context, 0, 0, fw/2, 0, 1);
    CGContextAddArcToPoint(context, fw, 0, fw, fh/2, 1);
    CGContextClosePath(context);
    CGContextRestoreGState(context);
}

+(UIImage *)makeRoundCornerImage : (UIImage*) img : (int) cornerWidth : (int) cornerHeight
{
	UIImage * newImage = nil;

	if( nil != img)
	{
		NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
		int w = img.size.width;
		int h = img.size.height;

		CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
		CGContextRef context = CGBitmapContextCreate(NULL, w, h, 8, 4 * w, colorSpace, kCGImageAlphaPremultipliedFirst);

		CGContextBeginPath(context);
		CGRect rect = CGRectMake(0, 0, img.size.width, img.size.height);
		addRoundedRectToPath(context, rect, cornerWidth, cornerHeight);
		CGContextClosePath(context);
		CGContextClip(context);

		CGContextDrawImage(context, CGRectMake(0, 0, w, h), img.CGImage);

		CGImageRef imageMasked = CGBitmapContextCreateImage(context);
		CGContextRelease(context);
		CGColorSpaceRelease(colorSpace);
		[img release];

		newImage = [[UIImage imageWithCGImage:imageMasked] retain];
		CGImageRelease(imageMasked);

		[pool release];
	}

    return newImage;
}

@end

Just call the static method makeRoundCornerImage and pass your image to have the image rounded off the way you want.

For example

UIImage *imageFromFile = [UIImage imageNamed:@"myimage.png"];
imageFromFile = [ImageManipulator makeRoundCornerImage:imageFromFile : 20 : 20];

Note that you do need the CoreGraphics framework for this to compile.

More information can be found at the blog post link above.

The second tip is to load a remote image over the web and display it in a UIImageView object.

Create the following method in your interface

-(UIImage*) newUIImageWithURLString:(NSString*)urlString
{
	return [[UIImage alloc] initWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:urlString]]];
}

Then call the following

UIImage *myImage = [self newUIImageWithURLString:@"http://url.to/image.jpg"];

Best G20 Tweet

April 1st, 2009 by Richard No comments »

The best #G20 tweet I’ve read so far

ursulaerrington: #G20. Feeling on trading floor is that they understand why people are angry. Dont mind protests as long as it doesn’t get violent.

Umm do they live in a different world to the rest of us?  How about blowing all your money have having to be bailed out to the tune of trillions of pounds by the taxpayer?

Things you can find about yourself online

March 27th, 2009 by Richard No comments »

Every now and again you find the curiosity to Google yourself and you find some interesting things. Well it depends on what you do for a living, and working in IT helps!

Well a quick Google later and I discovered that I was mentioned in a blog post in the Telegraph in 2007. OK the information isn’t quite accurate but cool nonetheless.

A blogger in France decided that my tips and tricks on iPhone development merited being mentioned along side the stunning work the core Facebook iPhone app developer did.

Finally I was also quoted in The Register in 2000.

.tel goes live

March 25th, 2009 by Richard No comments »

media_right_3Well I’ve just got my .tel domain http://richardhyland.tel

Time will tell if it’s any good or going to work, however I’ve actually got a .tel iPhone management tool awaiting approval from Apple.

Great come back to Brown at the EU

March 25th, 2009 by Richard No comments »

and

Update: Dan Hannan has made a blog entry about his video going viral and how the main stream media no longer control the news.  It’s definitely worth a read.

Conservative Logo Generator

March 16th, 2009 by Richard No comments »

…brought to you by the Labour Party.

Make your own logo, except hilariously they haven’t bothered to filter, check or prevent abuse of it

Try it yourself

http://torylogo.com/

1603092232_330220266

Grammatical irritations

March 16th, 2009 by Richard No comments »

We are not all grammatically perfect but when it comes to advertising you would have thought someone would check.

Advert on the tube for Nivea for men beginning with:

“who would of thought…”

Changing browser loyalties

March 11th, 2009 by Richard No comments »

internet_explorer_7_logoI’m a web developer and unlike a lot of developers I have been a big fan and user of Internet Explorer 7 and now version 8.

However the standards compliance of Internet Explorer has always left something to be desired.  With the introduction of 7 a few years back the job of making sites work in Internet Explorer became a whole lot easier, but there is still a lot missing that really ought to be included, and thank goodness transparent PNG support was added.

Recently I switched to using Internet Explorer 8 RC as my main browser and whilst I like it there were a number of failings I found.  The first is the so-called standards compliance.  Well seeing as it doesn’t support lots of CSS 3 properties doesn’t really make it standards compliant, but I digress. Mainly my issues were with it’s rendering of pages that looked great in Firefox, Chrome, Opera and Safari but just didn’t work properly in Internet Explorer 8.  The sites weren’t even using browser sniffing to load different stylesheets.  Quite simply IE’s implementation of the standards was different to all the other major browsers.  Sorry Microsoft, must try harder!

Over the past month or so I’ve suddenly discovered that I now use Firefox 3 as my primary browser at work (I still use Safari 4 at home as I’m a mac person) and combine it with Firebug and it’s simply stunning.

Spreadfirefox Affiliate Button

What actually prompted me to write about this was a story I picked up upon this morning entitled ‘IE8 May Be End of the Line For Internet Explorer‘.  It discusses the fact that Microsoft might be considering using Webkit (the engine behind Chrome and Safari) for Internet Explorer. In an article on AppleInsider Steve Ballmer is quoted as saying

Addressing a developer conference in Sydney Australia, Microsoft CEO Steve Ballmer said the idea of using WebKit as the rendering engine within its web browser was “interesting” and added “we may look at that.”

The fact that Ballmer would even mention using WebKit is very interesting indeed as you’d expect such a thing to be dismissed out of hand.  WebKit quite simply has the fastest and best rendering engine of any modern browser.  Just try Safari 4 on Windows or a Mac to try it out for yourself