Changing the size of an image in Photoshop CS6

An image file such as a JPEG or PNG file contains two types of data. The image essence and metadata.

The image essence is what is usually thought of as the image, i.e. it is colours and the position of those colors in the picture. When an image file is viewed, the image essence is unpacked into a two-dimensional array of color values in memory. Typically each pixel is represented as a four-value tuple: (red, green, blue, alpha). Each element in the tuple can have a value from 0 to 255 and the “alpha” value indicates the level of transparency for the pixel.

The metadata can hold information such as a description of the photo, copyright information, camera details, and other fields. Additionally, the metadata contains information about the dimensions of the image. The dimensions are represented in two different formats. These formats are referred to as the “Pixel Dimensions” and the “Document Size” in Photoshop.

The “Pixel Dimensions” is the size of the image measured in pixels in the X and Y directions. These pixel-based dimensions allow the image essence to be mapped from a linear array (such as a file) to a two-dimensional array in memory. The Pixel Dimensions size determines the size of the image when viewed in the majority of software because software is typically written to show one image pixel for every screen pixel.

The “Document Size” dimensions format consists of three values: (width, height, resolution). The width and height are be represented in Photoshop as linear units (mm, inches, etc) or as relative units (percentage of original). The resolution value is measured in pixels/inch (or pixels/cm). The Document Size dimensions are typically most important when printing an image. If the pixels/inch value matches the resolution of your printer (dots/inch) then the image on the printout will be width by height in size. However, if the resolution of your printer is twice that of your image you are likely to get a printed image that is half the height and half the width of the “Document Size” values. The reason is that that without any specific request for scaling, the printer will map one image pixel to one dot of output.

To resize an image in photoshop, open the image and select the “Image Size” tool from the “Image menu. In Photoshop CS6 this produces the dialog shown below:

Photoshop CS6 Image Size Dialog

Changing the Pixel Dimensions will change the size of the image as measured in pixels. The checkboxes at the bottom of this dialog control which numeric values are locked to the same relationship as in the original image.

Resolution values specific to the output or viewing device. Typical values for various devices are:

    • old monitor: 72 pixels/inch (common old publishing assumption)
    • average monitor: ~120 pixels/inch
    • low-end printer: 300 dots/inch
    • typical printer: 600 dots/inch
    • Retina laptop: 220 pixels/inch

As with most Photoshop dialogs, holding down the option-key will change the “Cancel” button to a “Reset” button. The reset button will revert the settings in the dialog back to the original values from the image.

The Image Size dialog is best used to change the size of an image without adding or removing any image content1. That is, the Image Size tool is used to scale an image up or down.

  1. Other posts describe the related “Canvas Tool” (for adding to images without scaling) and the “Cropping Tool” (to remove parts of the image.)
Posted in photoshop | Leave a comment

And the Emmy goes to…    LTFS


IBM LTO5 data tape media.

OMFG! My project won an Emmy!

The Academy of Television Arts & Sciences has announced the recipients of the 63rd Primetime Emmy® Engineering Awards. This year, one of four Engineering Emmys will be awarded one of which goes to IBM for the LTFS technology.

I was responsible for the architecture, format specification, and development lead for the Linear Tape File System (LTFS) from the start of the product development. During my work on LTFS I was instrumental in producing LTFS Single Drive Edition for Linux, OS X and Windows in 2010 (all platforms released within 12 months of starting the project); producing LTFS Library Edition in 2011; and laying plans for future LTFS products up to my last day at IBM.

omgbbqwtf!! Over.

“I’d like to thank the Academy, …”

Posted in award, emmy, ibm, LTFS, uncategorized | 6 Comments

joining Nimbula

After popping the IBM stack frame off my call stack the next step is to push a new Nimbula frame onto the stack. Today is the end of my first week working at a startup and, as expected, the experience is dramatically different from working at IBM.

I will need to come up to speed before I can talk intelligently about what Nimbula is doing and my role in the company. Right now, after a week I can only comment on the simplicity of the on-boarding process.

Continue reading

Posted in michael, nimbula | Leave a comment

leaving IBM

Today was my last day at IBM Almaden. I’ve been walking into the same building 5 days a week for about 9 years now. It’ll be weird to not do the same next week.

In my time here, I have shipped 4 different LTFS releases, numerous LTFS fixpacks, 3 LTFS Format Specifications, the first Information Archive appliance release, several internal projects, along with multiple papers and patents. I’ve worked with some extremely talented people and have helped an industry change the way they store and manage their data.

I will be taking some personal time before starting in my new role. I will continue posting my brain dumps about LTFS to capture as much information as I can share publicly. Over time I expect to post more about the new space in which I will be working.

Posted in blog, ibm, michael, uncategorized | 1 Comment

LTFS Format Specification and Open-Source

In an earlier post I mentioned that prior to the introduction of LTFS an application typically relied on proprietary APIs to read and write data tape. These proprietary APIs typically have used proprietary data formats on the tape media. These proprietary APIs and data formats lock an application developer to a specific layer of software which mediates access to the data tape storage.

With LTFS we took a very different approach. The LTFS filesystem-based approach to accessing data stored on tape brings significant benefits to the tape market. For example, application developers no longer need to learn specialized APIs, and users get a fully self-describing storage medium that largely behaves the same as more common storage media such as hard-disk drives and memory sticks.

The benefits afforded by LTFS are arguably sufficient to support releasing LTFS as proprietary software that uses a closed data format on the tape media. Rather than treating LTFS as yet another proprietary on-tape format, the LTFS team at IBM elected to release the LTFS Single Drive Edition (LTFS-SDE) software as open-source1. The LTFS open-source software release is licensed under the LGPL license to protect the LTFS format while providing application developers the ability to dynamically link with LTFS binary code without risking their own intellectual property. Each fix-pack released for LTFS-SDE has also been released under the LGPL.

In addition to the open-source software release, the LTFS team wrote the LTFS Format Specification document and released this specification to the public. This Format Specification describes the on-media data structures in sufficient detail for independent developers to read and write LTFS tapes that are compatible with other LTFS implementations.

During development of the LTFS software and the LTFS Format Specification the IBM team built a working relationship with developers at both HP and Quantum through the LTO Consortium. These relationships afforded an opportunity to inform HP and Quantum about the up-coming LTFS technology and allowed for some pre-release co-ordination between these three LTO 5 vendors. These on-going relationships have provided the opportunity to conduct inter-operablity testing between all three vendors. We are fortunate to enjoy continuing discussions between vendors on the direction and development of the LTFS format.

This communication, the open-specification, and the open-source approach to software distribution is motivated by a desire for LTFS to become an industry-wide standard. During LTFS development we recognized that if LTFS was a proprietary release then we would be adding to the fragmentation and incompatibility of data tape use. Instead, a release of LTFS as an open implementation with an open specification would create an environment that may lead to broad industry adoption. Broad adoption along with the ease of use benefits may result in expanded use of tape media for data storage. Expansion of the tape market would be good for the industry and all of us involved in the data tape business.

  1. Open-source release of LTFS-SDE is available for Linux and Mac OS X. The LTFS-SDE implementation for MS Windows is freely available as a binary release. The MS Windows implementation could not be released as open-source due to licensing terms on necessary third-party components
Posted in data storage, LTFS, open source, specification | 4 Comments

Problem with video-stream playback in OS X Lion (10.7)

My home IT infrastructure includes an Apple Mac Mini computer that is used as our media server and primary playback machine. The Mac Mini is connected to a 1080p LCD Television, 1GB LAN, and accesses a NAS for media storage. The main job of this machine is audio playback using iTunes, and video playback using Hulu Desktop1 with the occasional web-video streaming using Safari in fullscreen2.

This Mac Mini is a late 2009 model with a 2.26GHz Core 2 Duo processor, 4GB of RAM, and an NVIDIA GeForce 9400 GPU. Since this machine is not mission-critical for our household I figured it would be a reasonable candidate for our first Lion upgrade.

After the upgrade video streaming has become practically impossible. Both Hulu Desktop and web-based video streaming suffers from decompression artifacts that result in blocky video and video freezes. After a minute or so of playback the video stream will freeze on the current image and audio playback will continue. When the video freezes if I use VNC to access the machine I can see that the mouse cursor is beach-balling.

I have found that video playback can be made reliable and returned to the same quality as provided by OS X Snow Leopard (10.6) by disabling the new Lion functionality that restores applications to their running state after a reboot. To disable this function, open the System Preferences->General panel and uncheck the “Restore windows when quitting and re-opening apps” option. The option is shown unchecked in the screenshot below.

The OS X Lion 'Restore windows when quitting and re-opening apps' option. Option shown unchecked.

My suspicion is that the background task that takes a snapshot of the memory and system state for each running application is failing behind in taking snapshots when large amounts of RAM are updated. In video streaming by definition the application memory is undergoing large frequent updates. If my suspicion is correct, then instead of dropping work items the snapshot application is trying to process an ever-increasing list of work. The result appears to be CPU starvation to video playback. This starvation probably occurs in the Quicktime stack since the behavior is demonstrated in different playback applications.

  1. Development of Hulu Desktop has been halted. The Hulu Desktop download were removed from the website on July 2, 2013.
  2. We generally use our XBox360 for Netflix streaming since the interface is nicer. We also have a Sony BluRay player that is supposed to stream Amazon video on demand. It has been a 3 month and counting battle with Sony and Amazon support to get incorrect server-side state flushed before this device will stream correctly.
Posted in bug, os x, streaming, uncategorized, video | 4 Comments