Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.acorn.programmer > #6370
| From | Paul Sprangers <Paul@sprie.nl> |
|---|---|
| Subject | Re: Reading the dimensions of a sprite or JPEG on disk |
| Newsgroups | comp.sys.acorn.programmer |
| Date | 2022-05-30 13:58 +0200 |
| Message-ID | <59f0aeac8aPaul@sprie.nl> (permalink) |
| References | <59ef9cf586Paul@sprie.nl> <59ef9fa796chrisjohnson@spamcop.net> <59efa0a626Paul@sprie.nl> <ReWdnVLwIJhwvw__nZ2dnUU7-f2dnZ2d@brightview.co.uk> |
| Organization | None |
In article <ReWdnVLwIJhwvw__nZ2dnUU7-f2dnZ2d@brightview.co.uk>, Gerald Holdsworth <nospam@hollypops.co.uk> wrote: > Sprite files contain multiple sprites, so you would need to specify > which sprite you wanted dimensions of. I think I better describe what I'm after, because I run into more problems than reading sprite dimensions alone. I would like to be able to drag either a single sprite or a JPEG to my window, after which the BASIC program saves a sprite thumbnail of it, preferably to an existing sprite file. The thumbnail should be 40x40 pixels at maximum. I haven't been able to find a detailed description (or any description at all) of how to do this. At this moment I use the ChangeFSI library for the conversion, as described in a document called "CmdBasUse", found within the ChangeFSI application directory. After having typed "LIBRARY "<ChangeFSI$Dir>.ChangeFSI" at the top of my program, I have access to the following function: error% = FNChangeFSI(A$,spritearea%,workspace%,worklimit%,oksave%,okinfo%,RETURN ram%,fast%) A$ contains the paths and conversions details, as described in the same document. Until now I only succeeded to convert small JPEGs, that are converted to the desired sprite thumbnails indeed, but that are stored to disc, rather than to an existing sprite file. Larger JPEGs fail to convert at all, producing an error that I can't understand: "Unknown or missing variable in "ChangeFSI" in "ChangeFSI" [sic] at line 1672" - a line that has nothing to do with the routine in question. As I have very little to no understanding of the parameters of the function, I assume that I don't use them properly, although it does work for small JPEGs (smaller than 15KB, approximately). I let ChangeFSI create the spritearea%, as well as the workspace% and the worklimit%, by entering -1,-1,0 respectively, as described in the document. However, I've no idea what to do with the "RETURN ram%" parameter. I've entered a random variable (r%), which seems to be accepted by the function. But blindly experimenting with random spriteareas and workspaces has only resulted in fatal errors so far. As usual, I've actually no idea what I'm doing. Would someone be willing to explain how to use this function properly, or how to achieve my goal otherwise? Kind regards, Paul -- https://riscos.sprie.nl
Back to comp.sys.acorn.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Reading the dimensions of a sprite or JPEG on disk Paul Sprangers <Paul@sprie.nl> - 2022-05-28 12:08 +0200
Re: Reading the dimensions of a sprite or JPEG on disk News <chrisjohnson@spamcop.net> - 2022-05-28 11:37 +0100
Re: Reading the dimensions of a sprite or JPEG on disk Paul Sprangers <Paul@sprie.nl> - 2022-05-28 12:48 +0200
Re: Reading the dimensions of a sprite or JPEG on disk Gerald Holdsworth <nospam@hollypops.co.uk> - 2022-05-28 14:26 +0100
Re: Reading the dimensions of a sprite or JPEG on disk Paul Sprangers <Paul@sprie.nl> - 2022-05-30 13:58 +0200
Re: Reading the dimensions of a sprite or JPEG on disk Gerald Holdsworth <nospam@hollypops.co.uk> - 2022-05-30 15:16 +0100
Re: Reading the dimensions of a sprite or JPEG on disk Paul Sprangers <Paul@sprie.nl> - 2022-05-30 16:51 +0200
Re: Reading the dimensions of a sprite or JPEG on disk Gerald Holdsworth <nospam@hollypops.co.uk> - 2022-05-30 18:07 +0100
Re: Reading the dimensions of a sprite or JPEG on disk Paul Sprangers <Paul@sprie.nl> - 2022-05-31 09:27 +0200
Re: Reading the dimensions of a sprite or JPEG on disk Gerald Holdsworth <nospam@hollypops.co.uk> - 2022-05-31 12:12 +0100
Re: Reading the dimensions of a sprite or JPEG on disk Paul Sprangers <Paul@sprie.nl> - 2022-05-31 15:30 +0200
Re: Reading the dimensions of a sprite or JPEG on disk Gerald Holdsworth <nospam@hollypops.co.uk> - 2022-05-31 21:51 +0100
Re: Reading the dimensions of a sprite or JPEG on disk Steve Fryatt <news@stevefryatt.org.uk> - 2022-05-31 23:29 +0100
Re: Reading the dimensions of a sprite or JPEG on disk Martin Wuerthner <spamtrap@mw-software.com> - 2022-06-07 16:33 +0200
Re: Reading the dimensions of a sprite or JPEG on disk Paul Sprangers <Paul@sprie.nl> - 2022-06-11 08:56 +0200
Re: Reading the dimensions of a sprite or JPEG on disk Sprow <news@sprow.co.uk> - 2022-06-12 08:15 -0700
Re: Reading the dimensions of a sprite or JPEG on disk Martin <News03@avisoft.f9.co.uk> - 2022-05-31 13:10 +0100
Re: Reading the dimensions of a sprite or JPEG on disk Paul Sprangers <Paul@sprie.nl> - 2022-05-31 15:59 +0200
Re: Reading the dimensions of a sprite or JPEG on disk News <chrisjohnson@spamcop.net> - 2022-05-31 16:28 +0100
Re: Reading the dimensions of a sprite or JPEG on disk News <chrisjohnson@spamcop.net> - 2022-05-31 16:51 +0100
Re: Reading the dimensions of a sprite or JPEG on disk Paul Sprangers <Paul@sprie.nl> - 2022-05-31 18:33 +0200
csiph-web