Recent Articles

Victims of Capitalism

Comments Off comments. 13 June 2007

In the spirit of the Victims of Communism memorial being unveiled in Washington, I think we should design and build a monument to the hundreds of millions—billions—of people who have died as a result of capitalism. It should be appropriately scaled.

We can build a “Victims of Socialism” monument, too, for completeness. These are mostly people who suffer through the UK’s sorely underfunded health care system.

Of course, your typical American history class, and hence your typical American adult, draws no distinction between communism, a centrally-controlled economy in which all citizens are equal owners, and an authoritarian dictatorship, such as, for instance, Russia under Stalin.

The question of whether or not communism can succeed on any meaningful scale is a long-standing one, which has been the source of much debate. But anyone with a clear understanding of civics can understand that these people were not victims of an abstract economic theory, but of corrupt and brutal leaders.

Photoshop Silkscreen Effect

Comments Off comments. 6 June 2007

I’m no Photoshop guru. In fact, I stink. I struggle to change the colors of the paintbrush and I once spent two hours trying to make an open circle blend propery. But inspired by my roommate’s recent Photoshop work and this tutorial I decided to try something, and, shockingly, it worked.

playing with contrast.future t-shirt?

The goal was to create a silk-screen effect, like you might see on a T-shirt or poster. Silk-screen typically works with a small number of colors, since each color requires another pass through the printer (and more money), and with high-contrast images. To do multiple colors, you start with the lightest and layer up to the darkest, that’s exactly what you see in this effect.

Basically, you separate the image into very rough layers of brightness. Color each of those layers separately, and then combine them back on top of each other. The bottom layer is the whole image, then each successive layer leaves out lighter and lighter areas, so the top most layer only picks up the darkest parts of the picture. Here’s how it works:

  1. Start with a picture with a lot of contrast. You need pretty big differences between light and dark. Or at least, a lot of both.
  2. Trim out the section of the picture you want. (Note: This is the step I basically skipped. I did a very rough cut with the pen tool.)
  3. Change the image to gray scale. Since we only care about light vs. dark, we can get rid of the colors.
  4. Decide how many levels you’ll have. In Photoshop, open this many new documents. They’re not for saving, just for copying. They just need to be big enough to hold your image. (Note: You could do this on different layers, too, but I liked to be able to see all four layers next to each other.)
  5. Copy your gray scale image to each of the new documents (or layers).
  6. Now we screw with the brightness/contrast settings:
    1. For the background, brightness and contrast to 0.
    2. For the next layer, contrast to 100, brightness somewhere around -30, or to taste.
    3. For the rest of the layers, keep upping the brightness. The result is that only the darkest parts are left.
  7. Now copy all these to a single document, stacked in appropriate order in different layers.
  8. Right now, they’re all black, so one layer at a time, start changing the colors. You can do it with a paint bucket, brush, however you feel like it. I used fill layers to pick up all the little bits. Remember two things:
    1. The colors should be somehow related or complimentary, I find that going in straight lines across the palettes usually works.
    2. The lowest layer is the brightest part of the picture. All the subsequent layers only cover the dark spots. So, you probably want to start with a light color and work your way to dark.

So that’s it. A single black layer will give you Che Guevara. Three or four layers will give you a silk-screened look. You can use the colors to make various kinds of statements.

It’s been a while since I’ve done anything resembling a tutorial, and they’re not usually for Photoshop, but this was a kind of neat trick. And I thought, what the hell? I’m sure anyone who would have reason to do this already knows how, but it gives me a reason to update the blog.

The original image is from the movie 300. I’m not sure if it’s a frame or production still or what. I’m sure it’s not, but let’s pretend it’s “fair use.”

No Checks: Cache!

Comments Off comments. 4 June 2007

The title is a horrible pun, but doesn’t doesn’t mean Internet Explorer 7 doesn’t ignore web designers and caches things it shouldn’t.

I’m heading development of a small script to let users upload and vote on pictures of China, and at the end of the voting period, we take the most popular pictures and turn them into a book. The "vote" action seemed like the perfect candidate for an AJAX implementation: we didn’t want a page reload, and all it does is increment a value in a database row. Easy enough.

Or not. While it worked out of the box in Firefox and IE 6, we discovered an interesting problem with IE 7’s "native" implementation of the XMLHttpRequest object. IE caches the first returned value and doesn’t actually do the server call again. You actually have to quit the browser and reopen the page to repeat the action and get a new result.

Our project limits voting to once every 10 seconds, and if you vote faster than that, it asks you to wait. If it’s been 10 seconds, it thanks you for your vote.

In IE, it counted the first vote, and then kept saying thank you, without counting subsequent votes. A quick search revealed that most people solve this by appending some junk data to the query string, a random number or timestamp, that changes all the time. A solution my boss and I had also decided to try, to no avail.

In the end, it was a combination of junk data and four separate "no-cache" headers, telling IE in every way possible that the data was uncacheable and, among other things, had expired in 1997, that finally worked.

Microsoft, and the internet in general, would benefit from actually complying to standards.

More Posts

Subscribe

Tags

Popular Posts

Recent Comments

Search

Tweets

Links

Incoming Links