Beginner question: loading image into lcd in vanilla Max?

pee bee's icon

Hey, I just finished the vanilla Max basic tutorials and am working on a pet project to put together what I've learned so far, but I'm stuck already...trying to load an image into an lcd object.

The lcd reference says a "readpict example.jpg" message with a symbol pointing to the image in the Max file path should bring that file into RAM, as well as trigger the lcd object to output "pict example.jpg" from its rightmost outlet if successful, and an error message if unsuccessful. The lcd reference also says that a "drawpict example.jpg" message should draw the named image in the lcd once the image has been read.

Here's a screenshot of my set; I am not seeing any output from lcd nor any image in lcd (with an imovie object next to it showing the image exists and is readable). Any help would be appreciated (and patience, as this is my first solo patch ever!)

Roman Thilenius's icon


i believe "readpict" only works with the (almost deprecated) pct/pict picture file format.

pdelges's icon

Almost deprecated? You can't use pict files in Max since quite some time…
But lcd will load png, gif and maybe other formats with the readpict message. Just try!

Roman Thilenius's icon


you sure thats max? on windows 10/64 they still open.

pdelges's icon

I'm quit sure it's OSX and the deprecation of QT. Even OSX itself doesn't handle PICT files well…
Everytime I open an "old" Max project in Max8, I first need to convert all PICT files (for OSX there is the handy "ConvertPICT.app" available, as even Preview doesn't allow to export a PICT file into another format!).

Roman Thilenius's icon


on windows 10 i would consider a quicktime installation (still?) for "normal" for a max user (and i am also not suprised by wrong information in the help files. ;) )

but i would not have thought that OSX makes trouble with that. quicktime should still work in mojave, no? the only thing which doesnt work anymore is the online "pro" registration.

yes i know, max doesnt use qt anymore, i just mean generally. it would be a joke if macOS wont be able to handle pict.apple.com anymore.

how about your files: did they have a filename extension? wouldnt it be enough to just rename them to .jpg?

pee bee's icon

Hi all, thank you for your replies. So I'm not actually trying to load a pict file. I'm trying to load .jpg and .png files. I had attached a screenshot to my first post (maybe it's not viewable?) that shows a .jpg file I'm trying to load via a readpict not showing up.

pdelges's icon

Sorry pee bee.
If you look in lcd's help file, you'll see you need to name the picture.
You first send the message readpict a_name myfilename.png to read the file.
Then you draw it with the message drawpict a_name.

pdelges's icon

Roman, it's not Apple's first joke!
Preview will allow you to open a pict, but then you can only export it as a pdf, no other format.

Roman Thilenius's icon


oops, we forgot the OP. :)

preview.app ... is unusable since 10.6 :(

luckily! i had a weird issue with .pct in the millenial OSX 10.04 - so right after i started my first max 4 projects i have switched to using .jpg only to be fit for the future. it means 0,5% quality loss (for possible re-use in photoshop), but thats better than converting thousands of source paths 19 years later.

pee bee's icon

If you look in lcd's help file, you'll see you need to name the picture.
You first send the message readpict a_name myfilename.png to read the file.
Then you draw it with the message drawpict a_name.

This works, thank you! Able to load a .png now. Looking at the help file was really....helpful (-__-). I was looking at lcd's reference file, which says for the readpict message:
Arguments:
filename [list]
The word readpict followed by a symbol which specifies a filename...

So this didn't mention the name argument before the filename, which threw me off.

Roman Thilenius's icon


"filename" ... yes, helpfiles are wonderful, sometimes two errors in one sentence.

but in this case the html reference also embezzles the second argument to "readpict", so the nonsense is at least concludent:

The word readpict followed by a symbol which specifies a filename, looks for a QuickTime graphic file (a .pct file openable on Windows using the QuickTime Picture Viewer for Windows) with that name in Max's file search path

Rugerfred_84's icon

Hi, guys. I'm having the same problem as Pee Bee. I tried to follow what you suggested, but I think i missed something... Can anyone help me to get what I'm doing wrong?

Max Patch
Copy patch and select New From Clipboard in Max.

pee bee's icon

Hey @rugerfred_84, here's what I learned:
readpict message takes a symbol name first (can be anything, think of it as a label), then the filename:
readpict symbol_name filename
You then use the symbol name in a drawpict message (not writepict as you have) like so:
drawpict symbol_name
Hope this helps!

Rugerfred_84's icon

Yeah, perfectly clear. Now it works!
Thank you very much.