Pick of the Week - Nov 10 [Show all picks]
Path Finder 5 - A feature-laden Finder replacement
Submit Hint Search The Forums LinksStatsPollsFAQHeadlinesRSS
12,000 hints and counting!

10.5: Show user pictures with transparency System 10.5
It bugged me for a long time that the user pictures in the login window would not respect a user picture's transparency mask, but draw the icon on a white square instead. Luckily I found out how to get rid of this in Mac OS X 10.5! As this solution requires the use of Terminal, the usual "use at your own risk" applies.

Leopard stores the cache where it keeps the user pictures accessible via the command line utility dscl. Let's assume the user account whose picture we want to change is called steve. (Obviously, replace steve with the short name of your account in the following commands). Type the following into the terminal:
dscl . -read /Users/steve Picture
This should give output like this, reflecting your currently-selected image:
Picture:
 /Library/User Pictures/Animals/Butterfly.tif
There is also an entry in dscl called JPEGPhoto that contains a hex-encoded JPEG version of this picture. If you delete this JPEG version, the OS will use the TIFF, which may actually have an alpha mask!

You can do so by typing:
sudo dscl . -delete /Users/steve JPEGPhoto
Check the Picture entry again with the first command above, as it might have been reset. Now change this entry to point to your new picture; I assume you have created a new directory inside /Library/User Pictures for your own 48x48 TIFF images. Assuming you'd like to use kermit.tiff from a directory named muppets in the User Pictures directory, you'd use this command:
sudo dscl . -change /Users/steve Picture '/Library/User Pictures/Animals/Butterfly.tif' '/Library/User Pictures/muppets/kermit.tiff'
When you log out, you should see the new user picture including the correct transparency (assuming the TIFF has some, of course). To easily create the user pictures, I used Candy Bar 3, which lets you export icons as TIFF images. Special thanks go to Craig Hockenberry of the Iconfactory for initially pointing out to me that the Finder keeps information about the user pictures in a directory accessible via dscl.

[robg adds: I haven't tested this one.]
    •    
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[10,516 views]  

10.5: Show user pictures with transparency | 10 comments | Create New Account
Click here to return to the '10.5: Show user pictures with transparency' hint
The following comments are owned by whomever posted them. This site is not responsible for what they say.
10.5: Show user pictures with transparency
Authored by: mike666 on Fri, Apr 4 2008 at 10:53PM PDT
I'd noticed the lack of transparency but hadn't been annoyed quite enough to research it as I don't have accounts set to show in the login pane - I only get a brief glimpse of my user icon after I hit return upon typing my login. This hint worked perfectly for restoring the transparency of my carefully crafted icon though. Thanks for sleuthing this!

[ Reply to This | # ]
10.5: Show user pictures with transparency
Authored by: Brontojoris on Sat, Apr 5 2008 at 4:50PM PDT
Great hint! I never would have worked this out for myself.

[ Reply to This | # ]
10.5: Show user pictures with transparency
Authored by: Skidmaark on Tue, Apr 8 2008 at 8:44AM PDT
Although the tip seems to work because I see my picture in the Accounts preference pane, when I'm at the login screen, I see the Apple default user picture.

Any thoughts?

[ Reply to This | # ]
10.5: Show user pictures with transparency
Authored by: hedgepig on Wed, Apr 9 2008 at 11:58AM PDT
log in, and then change the entry for "Picture" again. Also be sure to type the new pictures path correctly and the old path too.

If that doesn't help you might want to post the output of your "dscl . -read /..." command

[ Reply to This | # ]
10.5: Show user pictures with transparency
Authored by: magnamous on Thu, Oct 2 2008 at 4:15PM PDT
I love this hint. Just so you know, if you have Fast User Switching turned on, you only have to go to the login window to see the change (logging out is not necessary unless you want to see it in the Fast User Switching menu in the menubar).

[ Reply to This | # ]
10.5: Show user pictures with transparency
Authored by: iAlphan on Tue, Oct 21 2008 at 3:05PM PDT
It works, but messes up your Address Book picture.

[ Reply to This | # ]
10.5: Show user pictures with transparency (Address book gets messed up)
Authored by: dilvish1984 on Sat, Oct 10 2009 at 7:32PM PDT
Yeah, apparently Address Book refuses to store its images as TIFFs, and it seems to rely on the JPEGPhoto key value in the dscl database for keeping its copy of the "My Card" image up to date.

I even went back and used Address Book's interface to reselect the correct image, using the "Choose…" button in the picture editor that comes up when you double-click the thumbnail on a contact, and selected the actual TIFF that I assigned to my user with the given dscl commands, and that caused the JPEGPhoto key to be repopulated in the dscl database, and the system then proceeds to ignore my finely crafted TIFF once again… I guess we can't have it both ways!

[ Reply to This | # ]
10.5: Show user pictures with transparency (Address book gets messed up)
Authored by: dilvish1984 on Sat, Oct 10 2009 at 9:16PM PDT
Okay, I may have found at least one way to work around this, but it requires a MobileMe account.

Don't ask me why, but it occurred to me that the MobileMe Contacts web application might do a better job with the file formats that include transparency info, so I checked it out and sure enough, one of the options it accepts for upload-able Contact's image files is PNG. So, I saved my TIFF as a PNG, preserving the Alpha channel, and uploaded that. After the next MobileMe sync on my computer, my image for my "My Card" in Address Book now displays with transparency, and, more importantly, so does my user icon in the login panel and Fast User Switching menu!!!

Unfortunately, MobileMe web apps are really acting up tonight (anybody else noticing that?) so I can't check it out more rigorously right now, but I thought I ought to get a correction up here with as much as I know for now… maybe this could have been accomplished without using MobileMe, simply by importing the PNG version directly into Address Book on my computer (though I did try that using the TIFF with no success, so I'm a little skeptical of the chances…)

[ Reply to This | # ]
10.5: Show user pictures with transparency
Authored by: aclark1978 on Sat, Oct 10 2009 at 3:00PM PDT
Just wanted to add that this still works in 10.6 and add a bid of information.

• You don't have to use a TIFF file (under at least 10.6), I used a PNG with transparency information and it shows correctly in both the login screen and the fast user switching menu.
• You can reset the FUS menu by telling the SystemUIServer process to quit. It will automatically restart and all of the icons on the right-hand side of the menubar will refresh themselves.

[ Reply to This | # ]
10.5: Show user pictures with transparency
Authored by: macedonas on Tue, Oct 27 2009 at 2:53PM PDT
Is this still working on SL ? I'm trying to find out the path of the account picture that i took when install the SL. But i can't! With this command you said that will reveal me the path.
I'm writing

dscl . -read /Users/xxxx Picture

but it keeps giving me the instructions about the dscl (i think) and not the path of the picture.

Could anyone help, or just say where is the photo saved ? (I repeat the photo that i took after a fresh install)

Thanks in advanced

[ Reply to This | # ]