It is currently March 28th, 2024, 9:39 am

[D2D][Fixed] Issue with ImageCrop

Backwards compatibility issues related to the conversion of Rainmeter to D2D.
Marian
Posts: 8
Joined: March 19th, 2017, 8:14 am

[D2D][Fixed] Issue with ImageCrop

Post by Marian »

Hi,
in the new version 4.3 r3266, function "ImageCrop" probably works badly compared to older versions.
TestImageCrop.gif
I found a way to fix this bug in version 4.3 (below) but it's not an ideal solution because not compatible with previous versions.

Code: Select all

[Icon_Reflection]
Meter=Image
ImageName=opera.png
TransformationMatrix=1;0;0;-1;0;(#H#+[MeasureReflectionHeight])
X=0
Y=0
W=#W#
H=#H# -----------> H=[MeasureReflectionHeight]
ImageCrop=0,(#H#-[MeasureReflectionHeight]),#W#,#H#
ImageAlpha=128
DynamicVariables=1
Attachments
TestImageCrop_1.0.rmskin
(4.86 KiB) Downloaded 94 times
Marian
Posts: 8
Joined: March 19th, 2017, 8:14 am

Re: Issue with ImageCrop [Rainmeter 4.3 beta]

Post by Marian »

For me, unfortunately, this is a problem, because I have to make compatibility with version 4.3 in my skin. Although I'm prepared to do so I do not like the authors' approach to backward compatibility. Someone will say something ? :)
User avatar
Brian
Developer
Posts: 2673
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: Issue with ImageCrop [Rainmeter 4.3 beta]

Post by Brian »

We are aware of the issue and are working toward a solution.

In the meantime I would like to point out a few things.
1. When developing Rainmeter, our first and most important goal to preserve backwards compatibility with older skins. This means that a skin made 10 years ago should look and operate in the exact same way today as it did 10 years ago. We work really hard to accomplish this, sometimes even giving up performance to do so. In very rare cases some options no longer work, or need to be changed (or fixed?) that causes some older skins to function improperly. These cases are usually very rare and we will document and inform everyone when making that change.

2. The beta cycle. Like all software, we go through a beta cycle. In most cases, major bugs have already been fixed before a beta release. However, in the 4.3 beta cycle, we have had two major improvements that have fundamentally changed our code base enough that it has been really difficult to "catch" some of these bugs before we decided to do a beta release. Since there are so many options and different ways of manipulating Rainmeter objects, we have to rely on bug reports (like this one) in order to help prioritize which bugs get worked on first.

Suffice to say, we will get to this issue (hopefully soon), and have a remedy before we do a 4.3 final version of Rainmeter. Again, backwards compatibility is our #1 goal, so I wouldn't recommend publishing a "special" skin for 4.3 users until we have worked out all the kinks.

3. Time. Our development team are volunteers and spend their free time contributing to this project for free. Work, school, and family will always take priority in our lives and finding the free time to work on this great project can be difficult at times.

-Brian
Marian
Posts: 8
Joined: March 19th, 2017, 8:14 am

Re: Issue with ImageCrop [Rainmeter 4.3 beta]

Post by Marian »

I understand it perfectly well as a programmer. I was surprised that no answer to this request :)
I've already prepared a skin that adapts itself to the Rainmeter version, but it required build a plugin to check the version of file (in this case Rainmeter.exe). Due to the fact that it affects the responsiveness of the skin, I don't want to use this solution for the time being.

By the way, it is a pity that the current version of the Rainmeter cannot be read as built-in variables.

I wanted to provoke a discussion writing this post. Have a nice evening! ;-)
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Issue with ImageCrop [Rainmeter 4.3 beta]

Post by jsmorley »

We think the ImageCrop issue is corrected in the latest r3270 beta of Rainmeter.

https://www.rainmeter.net
Marian
Posts: 8
Joined: March 19th, 2017, 8:14 am

Re: Issue with ImageCrop [Rainmeter 4.3 beta]

Post by Marian »

Thanks for solving issue :) but now I have another problems.
I will soon prepare tests and describe them in a new thread.
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm
Contact:

Re: Issue with ImageCrop [Rainmeter 4.3 beta]

Post by SilverAzide »

jsmorley wrote: December 19th, 2018, 2:17 pm We think the ImageCrop issue is corrected in the latest r3270 beta of Rainmeter.

https://www.rainmeter.net
It appears there is still a issue with ImageCrop. Rainmeter 4.2 is the first, 4.3 is the second. Note the icons in the upper left...

42.png
43.png
The skin is here: http://fav.me/d8n4kvx

The code is here (Network Meter Pro.ini, but any of the network skin variants will show this)

Code: Select all

[MeterNetworkImage]
Meter=Image
ImageName="#@#Network.png"
ImageCrop=(72 * #NetworkFrame#),0,72,72,1
ImageAlpha=255
AntiAlias=1
X=#GridPosX#
Y=7
W=30
H=30
DynamicVariables=1
TransformationMatrix=#Scale#;0;0;#Scale#;#Scale#;#Scale#

[MeterSignalImage]
Meter=Image
ImageName="#@#NetworkSignal.png"
ImageCrop=(50 * #SignalFrame#),0,50,50,1
ImageAlpha=0
AntiAlias=1
X=(#GridPosX# + 14)
Y=23
W=15
H=15
DynamicVariables=1
TransformationMatrix=#Scale#;0;0;#Scale#;#Scale#;#Scale#
Rainmeter 4.3.0.3271 beta (64-bit)
Language: English (1033)
Build time: 2018-12-19 10:27:22
Commit Hash: d01f37b5
Windows 10 Pro 1809 64-bit (build 17763) - English (1033)
Path: C:\Rainmeter\
SkinPath: C:\Users\____\Documents\Rainmeter\Skins\
SettingsPath: C:\Users\____\AppData\Roaming\Rainmeter\
IniFile: C:\Users\_____\AppData\Roaming\Rainmeter\Rainmeter.ini
Neurohax
Posts: 6
Joined: January 18th, 2018, 8:59 pm

Re: Issue with ImageCrop [Rainmeter 4.3 beta]

Post by Neurohax »

Just tried the latest beta (3271) and it broke all cropped images for me. 3266 scales the cropped image properly, 3271 doesn't scale the image after cropping.

Code: Select all

[BackgroundMap]
Measure=Plugin
Plugin=WebParser
URL=https://cdn.star.nesdis.noaaREMOVEMEREMOVEME.gov/GOES16/ABI/CONUS/GEOCOLOR/2500x1500.jpg
Download=1
FinishAction=!RainmeterRedraw

[Meterbackground]
Meter=IMAGE
MeasureName=BackgroundMap
X=0
Y=0
W=235
H=470
LeftMouseUpAction=[!Refresh]
PreserveAspectRatio=1
ImageCrop=1115,135,235,470,1

[MeterbackgroundExtended]
Meter=IMAGE
MeasureName=BackgroundMap
X=0
Y=R
W=235
H=140
LeftMouseUpAction=[!Refresh]
PreserveAspectRatio=1
ImageCrop=50,0,2100,1250,1

Same system specs as Silver.
Marian
Posts: 8
Joined: March 19th, 2017, 8:14 am

Re: Issue with ImageCrop [Rainmeter 4.3 beta]

Post by Marian »

Another problem related to the use of ImageCrop and Tile. Everything works correctly in version 4.2, 4.3 b3266. The problem occurred in version 4.3 b3270 and b3271.
TestImageTile.gif
Attachments
TestImageTile_1.0.rmskin
(2.85 KiB) Downloaded 84 times
User avatar
Brian
Developer
Posts: 2673
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: Issue with ImageCrop [Rainmeter 4.3 beta]

Post by Brian »

We think we have solved all the crop issues with the latest beta (r3277). Thanks for all the bug reports!

-Brian
Post Reply