How do you extract PICT resources?

Can you get a PICT resource and use it as a jpeg or a gif? If so, how? I think it is possible because I have seen slightly modified picts used in plugins, but I'm not sure.

------------------
Why are you all looking at me like that?

Quote

Originally posted by Sheer_falacy:
**Can you get a PICT resource and use it as a jpeg or a gif? If so, how? I think it is possible because I have seen slightly modified picts used in plugins, but I'm not sure.

**

Yes, take your PICT and use some shareware/freeware like GraphicConverter to save a copy as a jpg.

------------------
!ii!i i!i(url="http://"http://www.evula.com")e(/url)!i!(url="http://"http://www.evula.net")v(/url) ii! (url="http://"http://www.evula.com")u(/url)!!ii(url="http://"http://www.evula.net")l(/url)ii!(url="http://"http://www.evula.com")a(/url)

More specifically, open the file of choice (be a plug-in, a Nova Graphics file, etc.) with ResEdit, open the PICT resource, find the PICT you want, copy and paste in your graphic editor/converter of choice. Mantaray's suggestion of GraphicConverter is a very good one.

------------------
Mike Lee (Firebird)
Visit Cymltaneous Solutions: (url="http://"http://cs.paching.com/")http://cs.paching.com/(/url)

Thanks. What happens when you try to open the resource file when it has picts in it?

------------------
Why are you all looking at me like that?

Is there any way to do it en masse? How come Sprites doesn't have an inverse version like EnRLE/DeRLE?

------------------
Why are you all looking at me like that?

Quote

Originally posted by Sheer_falacy:
**Thanks. What happens when you try to open the resource file when it has picts in it?

**

Nothing. Try it and find out for yourself! No damage is done unless you delete or cut the PICT. Just open the PICT resource, select the PICT you want to copy, then hit command+C. Open AppleWorks or somethings and paste it by pressing command+V. But you probably knew that.

Quote

Originally posted by Sheer_falacy:
**Is there any way to do it en masse? How come Sprites doesn't have an inverse version like EnRLE/DeRLE?
**

Shift-clicking the PICT files you want will select multiple PICT files, but you can only copy them one at a time.

The reason w00tware didn't make the program you want is because it isn't really needed for EV developing.

------------------
!ii!i i!i(url="http://"http://www.evula.com")e(/url)!i!(url="http://"http://www.evula.net")v(/url) ii! (url="http://"http://www.evula.com")u(/url)!!ii(url="http://"http://www.evula.net")l(/url)ii!(url="http://"http://www.evula.com")a(/url)

Just what format are PICTs anyway? How are they encoded (besides the size DWRD and bounding RECT). In the RECT, are the top and bottom parts ever nonzero?

------------------
Why are you all looking at me like that?

Quote

Originally posted by Sheer_falacy:
**Just what format are PICTs anyway? How are they encoded (besides the size DWRD and bounding RECT). In the RECT, are the top and bottom parts ever nonzero?

**

Um, they're encoded the same way as PICT files. I believe they have RLE (run-length encoding) compression of some sort.

I haven't tried hacking PICT files in ResEdit, so I wouldn't know about your third question.

(Edit) Fixed a typo. (/Edit)

------------------
Mike Lee (Firebird)
Visit Cymltaneous Solutions: (url="http://"http://cs.paching.com/")http://cs.paching.com/(/url)

(This message has been edited by Firebird (edited 08-31-2002).)

RLE encoding? Like RLE8 and RLED? I thought you needed PICTs to make those...

------------------
Why are you all looking at me like that?

iBump

How does RLE encoding work? Does any website have psuedocode/real code for reading one in?

------------------
Why are you all looking at me like that?

No, I'm just saying that in the resource fork, I think that PICTs have this type of compression, much like GIF and TIFF files. It's just a form of compression. I don't know anything about reading that kind of data, other than using (logically) graphics software.

If you want to know how it works, it just compresses large regions of the same color -- these regions can be stored as a length and a color instead of storing every single pixel and its color separately.

------------------
Mike Lee (Firebird)
Visit Cymltaneous Solutions: (url="http://"http://cs.paching.com/")http://cs.paching.com/(/url)

Isn't that how GIF works?

------------------
Why are you all looking at me like that?