Show Pictures with alpha

Yes, thats it. You need to find a program that makes icons from photos that

Supports Apple’s 8 bits mask (DeepMask), i.e. the icons have different levels of transparency.

The icon masks are customizable, so that you

I downloaded Iconizer Pro (shareware utility) and made any photo I wanted into an icon. I took a pic of my girlfriend’s head, cut it out, and set it in a transparent window. I clicked “Iconize” and there was my custom Icon. I pulled it on the destop to check for transparency, and nope! That made a square icon…

Reading the manual further it says you can take any photo, cut out the border you want, and save it to a “Custom Mask” as an the outline of an 8 bit greyscale image. Then you will have your non-rectangular shape. You overlay the mask on your photo and click iconize, and there is the photo floating on the desktop with no border. I did it with ease.

Once you have that, find the script in here that alerts when things are added to a folder, and set the icon to display as the alert.
SC

thanks, but I don’t want a dialog with an Icon, I want a custom image shown.
ph

In my last post I said

Maybe I wasn’t very clear as to what that meant. When I said icon, I was talking about A CUSTOM IMAGE represented by icons. In other words, I found a picture of this Harley. I cut it out and converted it to icons so that it has no windows, a custom shape, etc. It is not the size of an icon, its half the size of my screen! The “Photo” is a big, custom, full color picture composed of several icons.
This “photo” is stored in a folder with the script. When an item is added to a user defined folder, the “photo” moves to the desktop. Send it back on user input.
I like this because there is no dialog prompt from the finder; You simply see your “custom image” :lol: appear on the desktop when a new item enters the folder.
SC

Sorry, it seems, that I misunderstood you. But know I got it. What I didn’t get is the way to show that “image-icon-set”.

How is the script command to show the iconset? Are you willing to share the code?

Thanks - ph

Good point. Let me do some debugging and I’ll post back pronto.
SC

Great. Looking forward to it and many thanks in advance.
ph

Here’s a very quick solution I came up with. As you said, you can do it in AS Studio so I created a small AS Studio application for viewing images with alphas (“AlphaViewer”). I also created some helper scripts. The first, “AlphaViewer Helper” allows you to select a folder when run (or simply drop a folder on to it) and it will parse the folder for images and then open them in “AlphaViewer”.

The second helper is a Folder Action that allows images to be opened in “AlphaViewer” when the are added to the folder to which the Folder Action is attached. You can also add folders to the Folder Action folder and it will open contained images accordingly (with subfolder parsing as well). You will run into some issues if you are copying the images instead of moving the images because I didn’t build any checks into the Folder Action to make sure the copy was complete before launching “AlphaViewer”.

There is also an included installer for installing the Folder Action and subsequently attaching it to a folder (once installed, just drop a folder on the installer icon and it will attach the Action).

When looking for images, the scripts look for files whose extension is in the following list:

· tif
· tiff
· eps
· pict
· picture
· jpg
· jpeg
· png
· pdf

This is unsupported freeware and it can be downloaded from:

http://homepage.mac.com/jonn8/as/dist/AlphaViewer.zip

Jon

When I posted

I did that in OS9. Lets say you have 16 icons that make up the picture [Iconset you called it]. Setting the specific positions of each item, you can easily have the “Iconset” appear as a photo. Basically 16 statements of *set selected item " " to position {x,y}.
:arrow: I must apologize for assuming that such a simple solution would carry over to X. So far as I’ve researched you can’t set the position of individual icons on the desktop. And that sux :x

If Jonn’s gracious post above doesn’t work for you, I know you said you wanted to “do it with AppleScript”, post back. Why dig a hole with a stick when you have a shovel right thar?

SC

Thank you jonn8. That’s not exactly what I looked for, but you opened my eyes for a more simple solution. Why looking for doing it directly inside the script, when the script can trigger a small app that can easily do want I want.

So I will realize the “show image” part in ASS and make the folder action only opening the App. To say it with Steve Jobs words: “It’s that easy!”

Also thanks to sitcom for taking time for that prob.

regards - ph

Jonn, does the alpha viewer work in OS 10.1?
I tried to use it with no avail… maybe I left out a step?
SC

When you say you want to see the alpha, do you mean you want to see it applied as a mask where the mask is transparent (as AlphaViewer does), do you want to see the inverse with just the alpha channel, or both with some sort of tint applied to the alpha channel indicating the mask? If it’s either of the latter two, then AlphaViewer won’t do what you want (at least not in its current state). It will show the images with the alpha channel applied as a mask so that it is transparent.

I doubt it (I tested on Mac OS X 10.2.8 & 10.3.8) and I think it’s 10.2+ only. Sorry, should have made the requirements clear.

I just quickly revised the app adding true AppleScript support (a sample script is included), improving the load speed for finding image files, adding keyboard navigation to the file list (use the up and down arrow keys and enter or return to show the selected image), improving the image scaling options, removing the Helper app, revising the Folder Action (it’s now editable), and polishing the package (icon, disk image, etc.).

The new version is available in the same location:

http://homepage.mac.com/jonn8/as/dist/AlphaViewer.zip

If you downloaded an earlier version, option-click the link to get the latest release (this will force your browser to get a new copy, not the copy that may be in your cache).

There is one small caveat for the AppleScriptablity of the app. When passing it a single alias (file or folder) to open, you must either coerce the alias to a string or a list. In other words, this will work:

And this will work:

But this won’t:

It’s a quirky bug I’m trying to track down.

You can also pass a list of aliases (or path strings) to it to open:

When you send files to AlphaViewer to open, the result will be a string with the number of images it loaded. So if you send it a folder, it will tell you how many images it found in that folder (and subfolders). A future version will offer the option of searching with subfolders or not.

Jon


[This script was automatically tagged for color coded syntax by Convert Script to Markup Code]

In all of this posting I had the idea to

  1. duplicate my desktop image ‘myfilename.jpg’ and name it ‘myfilename2.jpg’
  2. copy the “Splash” image into the position you want it to appear on the screen in ‘myfilename2.jpg’.
    anyone see where I’m going with this? :?
    Set your ‘new item alert’ to display ‘yourfilename2.ext’ as the desktop image. The refresh rate on my comp is so fast, it appears as though an image is being displayed with an alpha channel. Cheap fix? Absolutely!
    SC


tell application "Finder"
	set currentPicture to the desktop picture  as string
	try
		set the desktop picture to "Harddisk:Yourpicname2"
	end try
end tell

--as an example
display dialog "File received. OK?"

tell application "Finder"
	try
		set the desktop picture to currentPicture
	end try
end tell


I had thought of this too. A long time ago I wrote a little script for a desktop slide show. See it on my site:

http://homepage.mac.com/jonn8/as/html/misc.html

But with so many icons on my desktop, this wasn’t a good option for me.

I’ve now updated AlphaView again so that it supports toggling the alpha channel display on and off (for images that have an alpha channel, of course). I also added drop support for opening files or folders (drop files or folders on the app icon, the icon in the Dock, the displayed image window, the file list, etc.).

The app now handles more file formats as well: a file with an extension in the following list will attempt to be opened: {“bmp”, “eps”, “gif”, “jpeg”, “jpg”, “pct”, “pdf”, “pict”, “picture”, “png”, “psd”, “tga”, “tif”, “tiff”}. You can also specify whether or not folders passed to the app via AppleScript are recursively searched (with subfolders–the default is true). Some other minor bug fixes were addressed and now it’s time to do some real documentation and release more widely.

Latest build:

http://homepage.mac.com/jonn8/as/dist/AlphaViewer.zip

Feedback is encouraged.

Jon

Great work jonn.

After doing a research here I realized, that the thing I wana do is much more complicatet(it starts with having a titeless window) than I thought. I’m not a real programmer, I’m a graphic artist and scripting is more a hobby to make our life here in our agency a little easier than a profession. I give up now.

But let’s make a suggestion for the next build of Alphaviewer or perhaps Alphaviewer lite. You know “play sound”? A handy little tool, that plays sounds with no less options and no GUI, but it’s simple scriptable. Alphaviewer could do this with images.

LAst another question: The about box of alpha viewer has this nice effect (sliding in in full screen). Is it possible to realize his with ASS or ist this Cocoa-stuff?

Best regards - ph

Gee Prof, I hate to see someone throw in the towel, but I understand :shock: . Jonn I just wanna say thanks, I think “Alpha Viewer” is a great idea that came out of all this. There is nothing else like it, is there? You can use those “floating pictures” for all kinds of alerts etc.
SC

Sitcom you remind me to say: Thank You Jonn!!!

I found the Clock app to be a sort of Alpha viewer… The “Clock” splash is a tiff file stored in the resource foldero of the app. You can access it from classic mode by [control click] on Clock.app and choose ‘view package contents’ from the cm. You can replace the clock image with any image and preserve the alpha layer, saving as a tiff with the ‘Clock2.tif’ name.
Now when you open “Clock” your picture comes up. You can slide to change the level of transparency, etc.
The downside is the hands are still there.
:arrow: Is there any way to turn the hands off?
SC

Where do you found it?

:twisted:
There is a book series called OS X The Missing Manual…(missingmanual.com). They just released a new AppleScript volume. In the OS X manual it has a section called “mac os hacks”.

That’s where I found “it”

Or if you mean where is the resource file for the clockface, then follow:
*Restart in OS 9.x
*Open your harddisk and find the ‘Applications’ folder. Not for users, but the one that holds all the Mac apps that came with your system.
*You will see a file called ‘Clock.app’. HOLD THE ’ CONTROL’ BUTTON DOWN while clicking on ‘Clock.app’. Select ‘Show Package Contents’. The file turns into a folder, containing the resources.
*Open the folder. Open the folder “Contents”. Open the folder “Resources”. There are two pics: Clock02.tif, and Background.tif.
*Clock is the clock face, Background is the digital clock image. Open in a program that supports layers (Photoshop) and edit layer 1, saving layers. KEEP THE ORIGINAL NAME, this is the file reference! Otherwise this won’t work at all.

That’s also where I found “it”
SC
:lol:
You can also do this to the Dock; It shows how to put a custom image inside of it. Pretty cool effect. Lemme know if there’s interest.

I put it to ttrash (years ago) so for me it never was part of the system 8)