More Thoughts on Apple’s iPad

In my previous post, I lambasted the Apple iPad as a useless device.

Miguel de Icaza has a really good post praising the iPad:

This is a whole new space in which we can research, a new space that we can explore and where we can create a whole new class of computer/user interactions. With the new form factor, we can now create applications that just made no sense on the iPhone.

It is fascinating*.

And you know what? I agree with him: for developers who’re interested in writing touch-centric UI, the iPad is potentially a great* device.

Most people, however, will not be interested in this first revision of the iPad and should absolutely wait at least for iPad 2 or the next major OS revision. The feature set is still puny, and I think it’s far too expensive for what you get.

Personally, I’m not interested in writing an iPad application, but that’s because I’m more interested in what Windows 7 and multitouch can offer. It might have something to do with the fact that Paint.NET is a Windows app.

* not magical

Apple's iPad is a "magical device" … really!?

While watching all that iPad announcement hoopla, I kept thinking about this parody video that makes fun of Microsoft Paint:

http://www.youtube.com/watch?v=Hxx2KcPWWZg

Now, go to http://www.apple.com/ipad/ and click on the “watch the iPad video” link. See any similarities?

I kept waiting for Jobs to say something like, “haha just kidding, did you really think this is why we gathered all of you here today?” … except he didn’t. They’re completely serious about it. The apple.com home page says it is a “magical device”. Magical? Really? Unicorns and wizards are magical. They’re fun, but also fictional and nobody* actually takes them seriously.

magical!

That image is not edited with Paint.NET or Photoshop — they really had that slide up!

I’ll skip all of the obvious feminine hygiene references and jokes.

It’s a really big iPod Touch, and it has some wickedly good looking, and probably even well-written, UI.

But it can’t multitask. It doesn’t have a webcam for video calls. You still need a full PC/Mac to sync with. Apple, while publicly dissing them, has completely missed the point of netbooks: they are very cheap, and you can use all your existing stuff (apps, data, and devices) with them. If you drop it or lose it or break it, it’s not a big problem for the most part. Netbooks aren’t new or revolutionary devices: they’re simply a new price point.

I don’t believe that people want a third device. It isn’t something I would want to use everyday … why would I pay $500+ for it? Why would I buy a $30/month 3G data plan for it? Why should I have an iPhone in my pocket, and both an iPad and MacBook (or whatever) in my backpack? If I have a laptop and an iPhone, then I don’t need an iPad.

Any plausible reason that myself or my coworkers could come up with for actually buying an iPad was something that we could already do — and do better — on our iPhones, laptops, or desktops, or was just not possible with the iPad:

  • eBook reader? It’ll honestly be really good at that. But at a minimum of $500, I’d rather get the Amazon Kindle (it’s what, $200?). Or, and this is my personal preference, I’ll just buy the paperback for $10. I guess I’m old fashioned. Then again, my book shelf has been filling itself with books on physics and cosmology lately.
  • Taking notes in class? Except you still need a PC/Mac to sync with, and college kids don’t have oodles of money to throw at these things. So, I think they’ll skip it and just get a laptop. And there’s no stylus for free form note drawing, which I personally would need for any type of mathematics.
  • Can I plug it into my Mac/PC to use as a drawing tablet? Nope.
  • How about a Remote Desktop terminal so you can hook up to your main desktop/workstation while at the coffee shop or wherever? Sweet. A native iPad Remote Desktop app is very plausible. Except you have to buy a keyboard dock at that point, and you still won’t have a mouse. Why not just use your existing laptop? Or buy a $250 netbook?
  • A really big remote control for my home theater PC? Too expensive. Could be cool though.
  • How about docking it to my PC to use as an additional monitor? Nope.
  • Gaming! That must be it! Except I already have an iPhone. And an XBOX and a PS3. I really don’t need to play geoDefense on a larger screen, or Mass Effect 2 on a smaller one.
  • Install Windows 7. Nope, I don’t think you can do that 🙂

The list goes on and on. There’s nothing I can do on my iPhone or PC (laptop or desktop) that I can do better on the iPad. Nor is there anything the iPad can do that my other devices can’t. It’s too expensive, and there’s really no killer app. It does, however, have beautiful software, so I would like to give kudos to the software engineers who’ve worked on it.

I just don’t see the point. I’m still hoping for the “just kidding!” slide. I think they should’ve just extended Mac OS X to work better with a touch-only interface, and to scale down to even lower-end hardware. Add an iPhone emulator and extend the AppStore to Mac apps. Tada … I think that would sell.

Maybe they’ll prove me wrong. Maybe their stock price will hit $500. Or we could appeal to Occam’s Razor and observe that the Steve Jobs Reality Distortion Field has, apparently, been fully upgraded. Just like the Enterprise in-between every Star Trek movie …

* ok some people do … maybe they are the target market for the iPad?

Help test .NET Framework 4.0 Beta 2!

As I blogged about the other day, Paint.NET will be adopting .NET 4.0 fairly rapidly after its eventual release. The current release of Paint.NET, v3.5.2, makes use of .NET 3.5 SP1.

Scott Hanselman just blogged about how you can help to test out .NET 4.0 Beta 2 by setting a registry key so that it pops up in your Windows Update. The goal there is to test the deployment (aka installation) to help ensure things continue to go smoothly later this year when it’s rolled out to everyone.

It’s actually pretty easy and straightforward to do this… he’s got a .REG file you can download which pretty much does the whole thing for you.

Now, here’s where we can use big words like transitivity … by helping to test out .NET 4.0 Beta 2, you are in effect also helping out Paint.NET! I’m finally getting over this cold that seems to have hit everyone here in the Seattle area, and one of my next goals is to pop in that Visual Studio 2010 Beta 2 DVD and see how Paint.NET copes with the big scary framework upgrade…

You can also just go and install .NET 4.0 Beta 2 directly. However, Paint.NET won’t use it just yet.

I’ve also been doing a lot of deep thinking about what needs to be done for Paint.NET v4.0. There’s going to be a lot of changes under the hood in order to enable a whole lot of things that everyone’s been wanting for awhile, including and especially myself (please don’t ask what – at this point it’s just research, hope, and speculation). Many whiteboard markers are giving their lives for it …

Heads up: Paint.NET will require XP SP3 / Vista SP1 later this year

I’ve blogged about system requirements before. So far I’ve been content to leave the minimum version of Windows set to XP SP2, based both on user feedback and lack of necessity. It has come at the cost of adding about 2MB to the download package, but the work had already been completed and it was useful.

However, that will have to change soon. Later this year, Paint.NET will move to .NET 4.0. I am planning to do this before the increasingly mythic release of Paint.NET v4.0, and shortly after the public release of .NET 4.0 (whenever that ends up being). If you check out the download page for Microsoft .NET Framework 4.0 Beta 2, you will see that it requires XP SP3 or Vista SP1.

For many users this won’t be an issue. The updates are free*, and if you’re lucky then they’ll be automatically applied on some nice lazy weekend when you’re out sleeping, drinking, or fishing. Maybe even all three! Although if you haven’t updated yet, then please do so soon.

Many computers’ updates, especially those within the walls of corporate environments or educational institutions, are more conservatively applied (and with good reason). For those administrators in charge of such things, consider this blog post as my request to make sure all your XP boxes are at SP3, and that all your Vista boxes are at SP1 or SP2. There will then be one less obstacle toward getting .NET 4.0 installed, and thus one step closer toward the Paint.NET update which will require it.

While the minimum for Vista users will be SP1, I still recommend SP2 of course. That will help ensure you have the latest updates and security fixes as well as allowing you to install the Platform Update which includes DirectWrite, something that Paint.NET makes good use of if available.

For your convenience, here are download links for the service packs:

You can also just open up Windows Update and have it download and install things until it’s done.

* free in the sense that Microsoft does not charge for them.

How to fix: Unable to save .DDS files in Paint.NET v3.5.x

For those who just want the fix and to skip the commentary, go here.

Paint.NET v3.5.x requires a CPU with SSE support. Since SSE is a 10-year old technology, it was a pretty safe bet. I have only received one e-mail from a user who was confused about this. Oh, and a single blog comment from a gentleman who apparently believes he’ll be using the computer he bought in 2001 for a total of 20 years. That certainly is a long time to stick with XP! More power to him, but I certainly won’t be supporting XP anymore in the year 2020. Anyway …

The reason that SSE is required is for three reasons, none of which are really good enough on their own but together they were acceptable:

  1. DDS (DirectDraw Surface) file type support makes use of a C++ library called “Squish”. It has 3* optimization levels that can be chosen at compile time: normal, SSE, and SSE2. Enabling SSE for 32-bit systems was shown to yield a very large performance improvement. For 64-bit systems, enabling SSE2 is a no-brainer because all x64 CPUs support it.
  2. I wanted to cut down on the number of native DLLs that I had to dispatch out to, which would reduce the surface area of code that I was liable to maintain. Put simply: fewer code configurations means fewer bugs. In Paint.NET v3.36, I had 3 versions of Squish: x86, x86_SSE2, and x64. I knew that going forward this would turn into a rat’s nest of spaghetti code as I added more functionality to the “native” DLLs. Thus, I eliminated x86_SSE2 and switched on SSE “1” for the x86 DLL. There was also some additional native code consolidation. Almost all CPUs nowadays have SSE support, so this didn’t alienate very much of the user base.
  3. Eventually I will move Paint.NET to require SSE2, for reasons I will discuss later. Requiring SSE is a step in that direction.

Anyway, all this discussion aside, I just discovered that I accidentally compiled Squish to use SSE2. Oops ! The consequence is that if you have a Pentium III or Athlon XP and try to save a DDS file, Paint.NET will just crash, silently close, or print “Error” in the Save Configuration dialog.

You can wait for the next update, Paint.NET v3.5.3, or you can make use of the patch that I’ve published on the forum.

* Actually it has 4, because it also supports AltiVec. However, that’s for PowerPCs, and so doesn’t matter for Paint.NET.

Windows Vista users … why haven’t you installed SP1 or SP2?

I had a blog post earlier asking why some users had not installed SP3 for XP.

Anyway, the question here is similar: For those users of Windows Vista who haven’t installed SP1 or SP2, why? I receive many crash logs where the user is still on Vista “RTM”, and I can’t think of any reason for someone to be two service packs behind in their updates. For the upcoming v3.5.2, I plan on adding telemetry so that I can get real numbers on this, similar to how I am able to get statistics on OS version, CPU bitness, and locale.

In fact, there are two questions…

  • For those who are still on Vista “RTM”, why are you two service packs behind?  Why haven’t you installed SP1 or SP2?
  • For those are are on Vista SP1, why haven’t you installed SP2?

Part of the reason for asking this question should be obvious: I want to require SP1 (or even SP2!) as a minimum for Vista users (this would not affect XP users). This will reduce my test matrix, and give me more time for other things (like new features, and drinking beer).

A real glass prototype for Paint.NET v3.5

In a much older post, I talked about how I did a small experiment with glass. And, just the other day I talked about the latest visual refresh for Paint.NET. Since then, I’ve decided that the free icons available from http://www.pinvoke.com, by Yusuke Kamiyamane, are a much better fit than those from the Oxygen or Crystal sets.

I’m also playing a bit more with glass. Check it out,

Now, of course there are still a few things to work out, such as the left edge of the menu being offset by 1 pixel.

Unfortunately, a JPEG just can’t do it justice (nor could the PNG, even at 5x the file size). It looks much cooler “in real life,” when it’s drawn over your actual desktop.

DirectWrite for Windows Vista

Paint.NET v3.5 has added support for DirectWrite, a new component in Windows 7. It improves performance, text rendering quality, and reliability when compared to GDI+ or GDI.

DirectWrite is also coming for Windows Vista. Microsoft just released a beta version of the “Platform Update for Windows Vista”, which includes Direct3D 11, Direct2D, and DirectWrite. Check it out here: http://blogs.msdn.com/DirectX/

Paint.NET will automatically use DirectWrite if it is installed on a Windows Vista system. The code for enabling DirectWrite does not limit itself to Windows 7. You don’t even have to wait for the next update, you can do this now! This is all pre-release beta stuff though, so the usual warnings apply. The next update after Paint.NET v3.5 (let’s call it v3.5.1) should automatically install this for you, so that’ll be one less thing to have to remember (computers are good at automating and remembering things, right?).

Paint.NET v3.5 prepares for beta and gets a visual refresh

I’ve been chipping away at the last changes and fixes for Paint.NET before I stamp it as beta and release it to the larger, hungrier “Beta crowd.” This update will be published to users of previous stable versions who’ve opted into public beta updates, and made available via the built-in updater. Hopefully I can finalize and push the stable version out the door to all users by the time Windows 7 hits retail shelves (October 22nd).

Now, the visual styling of an application does not affect its functionality. However, it is a key ingredient for a positive, even enjoyable, user experience. Up through version 2.5, Paint.NET used a 16-color “Windows 95” icon styling. The icons were free, and the style and color palette were very easy to emulate for any custom icons:

For version 2.6, I upgraded the whole application to .NET 2.0, 64-bit, and “Windows XP” / “Visual Studio 2005” icon styling. This was great during Windows XP’s heyday:

For version 3.0, much of the styling remained the same albeit with subtle tweaks throughout. Since version 3.36 was released in August of 2008, to borrow a phrase from Stephen King’s The Dark Tower, “the world has moved on.” It’s quickly looking dated compared to other software and graphics trends.

I decided that I wanted Paint.NET v3.5 to look more at home when installed on Windows 7 and Windows Vista with the Aero theme. To accomplish this, I needed two things: updated visual styling, and updated icons. Visual styling refers to how the menus or highlighted items are drawn, and the first part of this implementation is already in the latest, public alpha release. There are some additional styling changes that will be in the next update, and here’s a preview:

(Note that the close button is simulated in this screenshot, since it only shows up when the mouse is over an image’s thumbnail, which is not the case here. But visually, you should get the idea.)

For non-Aero themes such as Classic or Luna, simpler visual styling will be used. There isn’t enough time right now for further changes, such as glass, but I’ve definitely got it on my radar for version 4.0.

However, icons are much more difficult and time consuming to update. Paint.NET has about 200 of them throughout the application. Some icons are standard and can be used as-is from whatever icon sets I’m pulling from, such as “Open” and “Save”. Others must be formed by combining other icons. “Paste into New Layer” is a good example of this. Others must be created from scratch, such as the selection mode and many effect icons. Some icons are extremely difficult to create; the pan tool (“hand”) and lasso tool icons are easily the trickiest icons ever (yes, I made them both myself!).

Icons are a significant problem for freeware software, both financially and with respect to their creation. While Paint.NET is an image and bitmap editor, I am not an artist. Every once in awhile I can take a good photograph, but that’s an exception and definitely not the rule. Custom icons through a professional studio would several thousand dollars (USD$). Even purchasing several stock icon sets to get a large enough pool of icons to work with would cost around $2,000 USD.

There just aren’t many high quality, free* icon sets out there. For years, I have fed off the freely redistributable icons from Visual Studio and from the very popular and free famfamfam “Silk” icons. Tango is another excellent icon set with wonderful licensing (it’s public domain!), and I’ve used a small number of them for Paint.NET v3.5.

I finally found two icon sets that were free, and whose licensing and distribution requirements were acceptable. They are the Crystal and Oxygen icon sets, which are LGPL and have been popularized via software such as KDE and OpenOffice.org. I don’t use either of those, but the icons are absolutely beautiful and fit in well with the Aero theme in Windows Vista and Windows 7.

Be sure to check out the preview pages for Oxygen, and for Crystal.

With respect to Paint.NET, it’s still a work in progress, but check it out anyway:

Like I said, the authors of these icons released them under the LGPL license. To adhere to their licensing and distribution requirements (they’ve posted guidelines that were very useful), and to avoid converting the entire application to GPL or LGPL**, these icons are not being linked into PaintDotNet.Resources.dll. Instead, they are installed as “loose” PNG files in the Resources/en-US/ directory where Paint.NET is installed. Also, I will be releasing the “source code” for the icon set, which means you’ll be able to download the layered PDN sources for any icon that needed it. For example, the “Open” icon above requires a few layers to achieve contrast, and to separate the folder from the blue arrow. Et cetera. The resources DLL will contain all of the old icons, for reliability reasons. The 2nd exception in the Paint.NET license will be removed. It will also be much easier to customize Paint.NET with your own custom icon sets, although this will not be surfaced as a feature yet – for this release, it is simply a side-effect of the way that the resource manager does resource lookup and fallback.

Thinking ahead, for Paint.NET v4.0 I’m figuring out what direction I want to take the UI. My current thoughts include … glass, ribbonization, how that would work with MDI (or not), extensibility extensibility extensibility, and moving to Windows Vista as the minimum OS requirement. The latter will free me from many of the development constraints I currently have, such as not being able to use Direct2D or many of the shell-related APIs. My experience with dual-targeting GDI and DirectWrite for fonts and typography has taught me that doing something similar with GDI+ and Direct2D would be suicide. I’m only 1 guy, and I simply won’t do that.

Oh, and the tentative, nebulous, waving-my-hands release date target isn’t until 2011. So don’t worry if you’re still on XP: you’ve got plenty of time. And, I think you’ll really enjoy the upgrade to Windows 7***.

* Free in this context means 1) no cost, and 2) compatible license and distribution requirements. Licenses such as GPL are incompatible with Paint.NET.

** Ideological opinions aside, this would not be possible for logistical (legal) reasons.

*** I say this honestly, but also bear in mind that I’m a Microsoft employee so I’m probably biased.

Paint.NET v3.5 – Better font handling, and performance. Again.

Last Thursday I release a new alpha of Paint.NET v3.5, build 3450. I have rewritten the way that fonts are handled for and by the Text tool. Even if you don’t use the Text tool much, you will still notice some improvements! (see the bulleted list below)

In previous versions of Paint.NET, there are two forms of text rendering supported. The first and the default is called “Smooth”, which utilizes GDI+* to render text. The second is called “Sharp”, and uses GDI. For both, GDI+ is used for font enumeration through the classes in the System.Drawing namespace. Over time, GDI+ has proven to be a poor system for font handling. It has been the cause of many crashes, as GDI+ has a tendency to crash or trample on memory when it encounters fonts that are “bad” (although bad is relative – the font itself may be perfectly fine!). This has led to some people being completely unable to use Paint.NET through no fault of their own.

As a result, I have banished GDI+ from the Text tool. The new builds of Paint.NET are using GDI exclusively for font discovery and text rendering, a change that was substantial in the amount of code that was required and the amount of research that had to be done to make sense of it all. If you’d like to get an appreciation of the depth of the subject, you should check out chapters 14, “Fonts”, and 15, “Text”, of the book, Windows Graphics Programming: Win32 GDI and DirectDraw (Hewlett-Packard Professional Books).

The new typography system in Paint.NET has been designed so that I can plug new text rendering technologies into it. Right now it only supports GDI. For the meantime this means that the choice between “Sharp” and “Smooth” is not available. My next step is to add support for two more text rendering systems, FreeType and DirectWrite (for Windows 7 users**). The former will step in to provide the “Smooth” renderer, and the latter will be added under the name “Enhanced” (or some appropriate name).

In the meantime, you’ll still realize the following benefits in the latest alpha:

  • No more “missing” fonts. GDI+ doesn’t support some fonts, notably bitmap, vector, and certain OpenType fonts. I don’t know why. You’ll notice that the new versions of Paint.NET now has a “complete” font list.
  • Improved startup performance. It’s ironic that I was telling my manager at work the other day, “Paint.NET v1.0 had poor startup performance – in fact, it was enumerating all the system fonts at system startup, but it no longer does.” Well, because of a bug in my layout code for the toolbar, Paint.NET v3.36 was still doing this! I fixed the bug, and Paint.NET v3.5 now properly defers this to later. I’ve measured the improvement in startup performance at about 15%*** on my systems, and if you have a “lot” of fonts you will no doubt see an even bigger improvement. This is in addition to the already improved startup performance of v3.5 versus v3.36!
  • Improved stability. Like I mentioned earlier, GDI+ often crashes when it runs into “bad” fonts (subject to GDI+’s definition of “bad”). Or, it has bugs that lead it to trample on memory it does not own, resulting in crashes which get attributed to the wrong code. GDI does not have this problem. Or, at the very least, if it runs into “bad” fonts, I now control the code that deals with this. I can then make it do something other than crash.
  • Installing new fonts. Previously, Paint.NET needed to be restarted for it to recognize any new (or deleted) fonts. I now place a FileSystemWatcher object on the system fonts directory and refresh the toolbar’s font list when changes are detected. There is also a shortcut in the Utilities menu to open the Fonts directory, which will be very useful for helping answer the question that is asked with surprising frequency on the forum: “How do I add fonts?”

* The Wikipedia article states that in the Windows XP timeframe, GDI was deprecated in favor of GDI+. This is not true, although it may have been the altruistic intent at the time.

** This will eventually be supported on Windows Vista as well. 

*** On my personal system, the difference is 0.577 seconds versus 0.405 seconds, as reported by Process Explorer. This is not a formal or exhaustive performance analysis. The precision and accuracy of Process Explorer is not at the millisecond level, hence me rounding all the way down to 15%. The system is an Intel Core i7 920 overclocked to 3.6GHz running Windows 7 RC build 7100. Another system, a Core 2 Quad Q6600 2.4GHz system running Windows 7, reported values of 1.0 second versus about 0.8 seconds, respectively.