It is currently March 28th, 2024, 11:34 pm

Inside image position

General topics related to Rainmeter.
User avatar
Yelleke
Posts: 73
Joined: September 5th, 2009, 11:38 am
Location: Belgium

Inside image position

Post by Yelleke »

I'm thinking of placing all my images in one png file like this one on deezer.com.

Image

but how can I tell rainmeter to use the possition and the length/height in the png file for showing the facebook icon.

another example
Image
winamp gives the song 3 stars

how to tell rainmeter to start after/behind the second golden star an show the next five.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Inside image position

Post by jsmorley »

Might be a solution using ImageCrop. Not sure. http://rainmeter.net/cms/Meters-Image

Interesting idea if possible, although I'm not sure how efficient it is going to be to load a huge .png file repeatedly in order to crop out a little chunks of it to display. This is not a game engine where you can load a "bitmap" one time when the app starts, and then just use that single memory copy to "cut out" pieces to use. Every meter using that image is going to load the entire image.
User avatar
Yelleke
Posts: 73
Joined: September 5th, 2009, 11:38 am
Location: Belgium

Re: Inside image position

Post by Yelleke »

jsmorley wrote:Might be a solution using ImageCrop.
for the stars, this works great.
jsmorley wrote:Every meter using that image is going to load the entire image.
Hmm, not a good idea, didnt know the bitmap was read for every meter

thx, JS
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Inside image position

Post by jsmorley »

Yeah, I just tested to be sure.

I loaded the same 5meg .png file three times in three meters, and as I added each one the amount of memory Rainmeter was using increased by a bit over 5meg. ImageCrop'ing one or more of the images made no significant difference. In fact it made it grow more, as I suspect that in fact it now had TWO copies of the cropped image in memory. The original, and the cropped version.