Blogs

Coming soon...

Well, it's exam time so it's been a while since I last posted. Only 4 days left though! I'll be back with more stuff to post soon...

Rating: 
Tags: 

The infamous PNG gamma/color correction problem

PNG images are great for Web work, but there's one problem that was really getting on my nerves: the color correction problem. PNG images, like many other formats, support embedded ICC profiles for color management. For websites this feature can become a big hassle since some Internet browsers (namely, Safari 3.x and up) will adjust the gamma and colors of images according to their embedded profiles, but the colors defined in CSS stylesheets are viewed with the native color profile. So if an image with an embedded ICC profile is used in combination with "background: " rules defined in a CSS stylesheet, the image will not match the background color of the page!

Fortunately, GIMP is capable of converting an image's embedded profile into the sRGB profile which was designed for use on the Internet.

First, GIMP requires a bit of setup:

  1. Select the color profile for your display by selecting Edit > Preferences from the menu and clicking on the Color Management section
  2. Set Mode of Operation to Color managed display
  3. From the Monitor Profile drop-down box, choose Select color profile from disk... and select the ICC profile which is you are currently using (tip: On OS X, ICC profiles are stored in /Library/ColorSync)

Once GIMP has been informed about which ICC profile your display is using, it can convert embedded profiles to the sRGB workspace:

  1. Open the image you want to convert
  2. Select Image > Mode > Assign from the menu and ensure that the sRGB profile is currently assigned
  3. Select Image > Mode > Convert from the menu and select the ICC profile that your display is using (the same one you chose in the setup sets)
  4. Save the image and if applicable, pass it through pngcrush to make it smaller
Rating: 

Lisa and Jackson get a Sony VAIO

I read an article on Ars Technica about the new Windows advertisement titled "Lisa and Jackson get a Sony VAIO". In the advertisement, Lisa and her 11-year old
son Jackson are looking for a $1500 computer, choosing a PC over a Mac. While I think it's good that Microsoft is recovering from the "Vista blunder" and starting to retaliate against Apple's aggressive ads, it bothers me that these ads are based on absolutely nothing.

After watching the ad (several times), the only valid point I could find was that Apple computer don't include Blu-ray drives (yet). Here are the things Jackson says he needs:

  • Speed
  • A big hard drive
  • A good gaming computer
  • Price under $1500

Hm, so we have one quantifiable objective and 3 other subjective ones.

Jackson starts by takes a look at the Macs and decides they are "a little too small" and immediately moves on. While I'll agree that the MacBook's 13.3" screen is a bit small (and the MacBook Pro is outside his price range), Jackson and his mother completely ignore all specifications! They move on to the PCs where they discover that they can use a remote to control the computer... Of course, no mention that Apple's computers have also this feature (and for years before it became mainstream on PCs, might I add). So in short, because the Sony VIAO Jackson is looking at has a Blu-ray drive and a 16" screen, he's sold. What happened to checking for "speed", "a big hard drive" or a graphics card? A large screen is always nice, but useless for gaming unless you have a decent GPU.

I did a quick search on bestbuy.ca (16" laptops, price range >= $1500) and it found two matching Sony VIAOs, so I took the more expensive one. For $1349.99, the Sony VAIO 16.4" Laptop (VGNFW275DW) (click for specs) features:

  • CPU: 2.26GHz Intel Centrino Core 2 Duo P8400 (3MB Cache, 1066MHz FSB)
  • RAM: 4GB DDR2 800MHz (2GB x 2)
  • Hard drive: 320GB 5400RPM
  • Optical drive: 2X Blu-ray writer, 8X DVD writer
  • Screen: 16.4" (1920 x 1080)
  • Display output: VGA, HDMI (not HDCP compliant)
  • Dedicated GPU: None (Mobile Intel GM45 Express, 1750MB shared system memory)
  • Battery: Lithium-ion (approx. 1-3 hour battery life)
  • Internal microphone amplifier
  • MS Duo & SD card readers

Here's the comparison with Apple's MacBook (click for specs), available for a very similar $1,399.00:

  • CPU: 2.0GHz Intel Centrino Core 2 Duo P7350 (3MB Cache, 1066MHz FSB)
  • RAM: 2GB DDR3 1066MHz (1GB x 2)
  • Hard drive: 160GB 5400RPM
  • Optical drive: 8X DVD writer
  • Screen: 13.3" (1280 x 800 LED backlit)
  • Display output: mini-DisplayPort (VGA, HDMI (HDCP compliant), DVI and dual-DVI available via $34 adapters)
  • Dedicated GPU: None (nVidia GeForce 9400M, 256MB shared system memory)
  • Battery: Lithium-ion (approx. 5 hours)
  • Multitouch trackpad (supports gestures such as three-finger swipe for back/foward and two-finger scrolling)
  • Extremely environmentally friendly: EPEAT Gold rating + more (see spec page for more info)
  • MagSafe power port: Magnetic power latch

I've left out any sort of software comparison since that is very subjective and opinions vary from user to user. As well, I did not list components which were equivalent such as the built-in webcam or wireless 802.11a/b/g/n.

Let's return to Jackson's original criteria:

  • Speed: VAIO wins by a tiny margin... The difference between the P7350 and the P8400 would be negligible during "real world" use.
  • Big hard drive: VAIO wins by a large margin, as Apple tends to be very conservative with their laptop hard drive size.
  • Good gaming computer: In reality, neither computer has a dedicated graphics card which is what really matters for gaming. Ignoring that fact, the MacBook wins by a huge margin. nVidia has reported that their 9400M is up to 5x faster than Intel's GM45 integrated graphics chipset. As always reports like that should be taken with a grain of salt since the "up to" can be a bit misleading. The 9400M, however, is still a much better choice than the GM45 even if it's only 2-3x faster on average and in one or two cases, 5x faster. Finally, we must also consider the RAM size and type. Sure, it makes the VAIO look great if you say "4GB of RAM!" but let's take a look at the bigger picture. The GM45 is using up to 1750MB of system memory, so that means that if you're gaming on the VAIO, you only really have 2GB of RAM... Just like the MacBook. The 9400M used in the new MacBooks only uses 256MB of system memory, which is much smaller than the GM45 - leaving 1.75GB available for system use. Let's not also forget that Apple is using faster RAM than the VAIO; DDR2 800MHz versus the DDR3 1066MHz RAM on the Macbook.

I'm not even going to compare the features outside of Jackson's criteria, I think you can see where this is going ;)

For your viewing pleasure, here's the ad:

Rating: 

Conficker

I have to admit, I'm pretty curious about what the giant botnet of Conficker-infected computers is going to start doing tomorrow. A large-scale denial of service attack is my first guess, but my instinct tells me there's something bigger in store... Either way, my clock currently reads 11:53PM so we're about to find out!

Edit: Did some quick research and it looks like the media hype got me. The only thing that's changing is the method which one variant (and not even the most popular one) receives new instructions.

Rating: 

File Fragmentation

The 500GB SATA drive in an external enclosure that I use for backups (eSATA/USB 2.0 connectivity) is currently NTFS-formatted for compatibility reasons. I would much prefer to use ext3 or HFS+, but it's pretty hard to get those two working correctly on all operating systems. Thanks to NTFS-3G and (Mac)Fuse, I can reliably access NTFS partitions on Linux, OS X and Windows (of course) so it's become my FS of choice when it comes to compatibility.

Unfortunately, that means that the drive becomes horribly fragmented (and pretty quickly, too). I decided to do a defrag today and found that the NTFS partition was 38% fragmented with 78% file fragmentation... Yuck. I'm going to be really happy when there's a filesystem that I can use on all operating systems that doesn't fragment or choke all the time. Ext2/3 was looking like a pretty good for the "doesn't fragment" part, but the ext2fsx project for OS X seems to have died out and ext2fsd, the only driver I've found for Windows that supports ext3 filesystems with inode sizes > 128, tends to bluescreen a lot. Back to waiting, I guess...

Rating: 

Motherboard poll

I realized that I had my Drupal permissions set wrong and users who were not registered could not vote (I have also disabled user registration for now). I fixed the settings so if you cannot see the voting options, just refresh the page and they should appear on bottom left side of the page. Please let me know who your favorite motherboard manufacturer is!

Rating: 

Installing GIMP on OS X

GIMP is a great program, but I always found it was a bit annoying to use on OS X (Leopard). First of all, whenever X11 starts, a new xterm window along with it. Besides that, when switching windows you need two clicks before GIMP (or any other program, really) registers the click and actually does something - the first click just switches the active window. Seeing as GIMP has it's tool palette in a separate window, this quickly became extremely irritating.

After a quick google, I found many sources saying that to disable xterm, I needed to copy /private/etc/X11/xinit/xinitrc to ~/.xinitrc and edit out the "xterm &" line inside. That's easy enough, but the only problem is that on Leopard with the latest X11 from XQuartz (2.3.2.1 at the time of writing) installed, /private/etc/X11/xinit/xinitrc doesn't exist! Although /usr/X11/lib/X11/xinit/xinitrc does, editing out all references to xterm doesn't work anyways. Instead, the app_to_run preference needs to be modified:

defaults write org.x.X11 app_to_run /usr/bin/true

/usr/bin/true is a command that does nothing (literally), so this essentially tells X11 to autostart nothing. I moved onto my next problem and found that to solve the two-clicks problem, the solution was to enable the "focus follows mouse" option like this:

defaults write org.x.x11 FocusFollowsMouse -string YES

I've been using that for a few months and I find it's still pretty annoying, but it's still less annoying than having to click twice on everything. Fortunately, I recently discovered the "wm_click_through" preference which is exactly what I had been looking for all along:

defaults write org.x.x11 FocusFollowsMouse -string NO
defaults write org.x.X11 wm_click_through -bool true

Now X11's window focus is back to normal, and clicking on inactive windows works as expected; it switches the window and activates the widget you clicked on. Problems solved!

Rating: 

New blog online!

Apart from having to design a new theme, my blog version 2 is up & running! Hope you enjoy it.

I'll be porting over the content from my previous setup into this one, but in the mean time you can access the old setup here: www.firewing1.com/v1

Update: The old content has been migrated, so the Joomla install at www.firewing1.com/v1 is now offline.

Rating: 

Facebook Terms of Use

The new facebook terms of use are just unbelievable. I first saw the story on Slashdot, but it's all over the web - Facebook owns everything you post, forever. Here's an excerpt from the official Facebook terms of use page:

You hereby grant Facebook an irrevocable, perpetual, non-exclusive, transferable, fully paid,
worldwide license (with the right to sublicense) to (a) use, copy, publish, stream, store, retain,
publicly perform or display, transmit, scan, reformat, modify, edit, frame, translate, excerpt,
adapt, create derivative works and distribute (through multiple tiers), any User Content you
(i) Post on or in connection with the Facebook Service or the promotion thereof subject only to
your privacy settings or (ii) enable a user to Post, including by offering a Share Link on your
website and (b) to use your name, likeness and image for any purpose, including commercial or
advertising, each of (a) and (b) on or in connection with the Facebook Service or the promotion
thereof. You represent and warrant that you have all rights and permissions to grant the foregoing
licenses.

So essentially, "I hereby grant Facebook the right to do anything they'd like with my pictures, comments and other media that I publish, including sublicensing that media, selling it, publishing it, or modifying it without having to compensate me." Nice. I'm not going to use Facebook until this is sorted out.

Please, join this group to show your concern. In the mean time, I've restricted my privacy settings - I recommend you do this too. Just click the Settings button at the top of your profile and remove all applications, disable Beacon and similar services as well as restrict everything to "Friends Only".

Rating: 

My theorem

timein day= 1d * 24h * 60m * 60s / (age/10)

Rating: 
Tags: