In that case, would it be possible to take care of the masking in a plugin? (And could you point me to a place I can read more about making plugins? I'm doing some simple c# + opencl stuff atm, I can try to make a plugin that handles this ^^ (well, it'll probably take me a lot of time, but I don't mind, I'll learn much out of it ))jsmorley wrote:I don't know of any way. If you create a mask image that is the size and shape of the visualizer meter, then any image you mask into that is going to be made to "fit" inside that. It will just be cropped to fit inside the mask image, but you have no real control over the W and H of the image, only the mask.
It is currently April 18th, 2024, 3:49 am
Masking an image with PreserveAspectRatio=1
-
- Posts: 48
- Joined: January 26th, 2018, 9:56 am
Re: Masking an image with PreserveAspectRatio=1
-
- Rainmeter Sage
- Posts: 16143
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Masking an image with PreserveAspectRatio=1
https://docs.rainmeter.net/developers/#CreatePluginchilio wrote:(And could you point me to a place I can read more about making plugins? I'm doing some simple c# + opencl stuff atm, I can try to make a plugin that handles this ^^ (well, it'll probably take me a lot of time, but I don't mind, I'll learn much out of it ))
-
- Posts: 48
- Joined: January 26th, 2018, 9:56 am
Re: Masking an image with PreserveAspectRatio=1
Didn't notice that one, thank you very much! We'll see where I get this to work or not ^^ (will take some time though, and I've got some exams coming up....)balala wrote:https://docs.rainmeter.net/developers/#CreatePlugin
-
- Rainmeter Sage
- Posts: 16143
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Masking an image with PreserveAspectRatio=1
I wish you many success for your exams.chilio wrote:Didn't notice that one, thank you very much! We'll see where I get this to work or not ^^ (will take some time though, and I've got some exams coming up....)
And if you finally do get it to work, post it here on the forum. I'd be also curious....
-
- Posts: 48
- Joined: January 26th, 2018, 9:56 am
Re: Masking an image with PreserveAspectRatio=1
I will try my best! ^^balala wrote:I wish you many success for your exams.
And if you finally do get it to work, post it here on the forum. I'd be also curious....
I mostly wonder if it's possible to use a GPU inside a rainmeter plugin, it should make this idea a whole lot less CPU intensive
I will keep you posted =D
-
- Rainmeter Sage
- Posts: 16143
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Masking an image with PreserveAspectRatio=1
I'm not quite sure I understood what you would like. To use the GPU processing capacity to run the plugin?chilio wrote:I mostly wonder if it's possible to use a GPU inside a rainmeter plugin, it should make this idea a whole lot less CPU intensive
If so, I don't think, but not being programmer, I don't say definitely you can't.
-
- Posts: 48
- Joined: January 26th, 2018, 9:56 am
Re: Masking an image with PreserveAspectRatio=1
Jup, seeing I'm trying to do some simple image processing and I just got some tools to get to the GPU, I should at least try it ^^ (but first on the CPU, otherwise I have nothing after miserably failing to target the GPU...)balala wrote:I'm not quite sure I understood what you would like. To use the GPU processing capacity to run the plugin?
If so, I don't think, but not being programmer, I don't say definitely you can't.
But first: some sleep see you tomorrow!
-
- Rainmeter Sage
- Posts: 16143
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Masking an image with PreserveAspectRatio=1
I agree, me too. Here is midnight.chilio wrote:But first: some sleep see you tomorrow!
-
- Posts: 48
- Joined: January 26th, 2018, 9:56 am
Re: Masking an image with PreserveAspectRatio=1
Alright, I have most of the basic code in place now:
The input needed:
So if you send this information to the program, it will try to render the target. It needs the X, Y, W, H values to see where each image is. (This gets rid of the PreserveAspectRatio as you'll need to do this for yourself now, will try to insert that later. Lets call it a lazy implementation so far ^^)
I still have a lot of questions though:
1. How does rainmeter load a plugin?
2. How does a skin send the needed information to the plugin?
3. How do I send back the resulting image?
The input needed:
Code: Select all
[First]
Path
X
Y
W
H
[Second]
Path
X
Y
W
H
[Target]
X
Y
W
H
; A combine mode, where you can choose what you want done. (Will add more later)
Mode = { Mask | Add | Mean }
I still have a lot of questions though:
1. How does rainmeter load a plugin?
2. How does a skin send the needed information to the plugin?
3. How do I send back the resulting image?
-
- Posts: 48
- Joined: January 26th, 2018, 9:56 am
Re: Masking an image with PreserveAspectRatio=1
Oh, I just got some visual feedback =D (it's not great, but I should be able to easily work further from here as the visuals are hacked together (while I actually put in clean code in the image processing))
Okey, I got something better, but I can't seem to upload bmp files?
Well, I got a png =D masking went well, I have to work on the preserveRatio though...
This is the mean color of Win 8 default pictures 'city' and 'butterfly', but sadly only the left top corner... I'll give you something better if my uni buddy can wait for so long ^^'Okey, I got something better, but I can't seem to upload bmp files?
Well, I got a png =D masking went well, I have to work on the preserveRatio though...
You do not have the required permissions to view the files attached to this post.