It is currently March 28th, 2024, 7:52 pm

[D2D][Fixed] UseExifOrientation not working

Backwards compatibility issues related to the conversion of Rainmeter to D2D.
mochibear
Posts: 45
Joined: June 3rd, 2014, 11:16 pm

[D2D][Fixed] UseExifOrientation not working

Post by mochibear »

Hi guys,

I think this is one of the original threads: https://forum.rainmeter.net/viewtopic.php?f=5&t=18573&p=100923#p100923


I am having an issue with the following script (thank you jmorley for helping build it!) for images that contain EXIF data. The images are being shown sideways; after a bunch of testing, it looks like the plugin is (what looks like incorrectly?) reading EXIF data. Honeyview, Irfanview and PotPlayer are displaying the image properly.

As a temporary workaround, I have created a backup and stripped the EXIF data to all the pictures I am showing on the desktop.
To my credit, I did try to use a reference I found in Rainmeter manual "UseExifOrientation=0" but I think this is for the image plugin and not the quote one which we're using here!

My question: Is there ANY way to tell the meter to not use/ignore EXIF data so I don't hurt my neck looking at the pics sideways (LOL!).

Here's the code:

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=0

[MeasureMyPictures]
Measure=Plugin
Plugin=QuotePlugin
PathName=D:\Sandboxes\Dropbox_PhotoFrame\user\current\Dropbox\
Subfolders=1
FileFilter=*.jpg
UpdateDivider=10

[MeterBackground]
Meter=Image
ImageName=D:\Applications\Rainmeter\Skins\mochibear\mochibear Pictures (with thin Frame)\\Background.png
W=1100
H=800
GreyScale=0

[MeterShowPicture]
Meter=Image
MeasureName=MeasureMyPictures
X=40
Y=5
W=1024
H=768
PreserveAspectRatio=1
LeftMouseUpAction=[!Refresh]
Last edited by Brian on January 15th, 2019, 7:04 pm, edited 2 times in total.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: [Advanced] Preventing Quoteplugin from using EXIF data (ATTN: jmorley)

Post by balala »

Where have you added that UseExifOrientation=0 option? It belongs to the Image meter, not to the Quote plugin measure. So, you should have to add it to the [MeterShowPicture] meter, not to [MeasureMyPictures] measure. But if you didn't add it, the meter should use its default value, which is 0, so the meter shouldn't have to read those EXIF information.
Could you please post one image from those shown up by the skin? Just to check it...
mochibear
Posts: 45
Joined: June 3rd, 2014, 11:16 pm

Re: [Advanced] Preventing Quoteplugin from using EXIF data (ATTN: jmorley)

Post by mochibear »

balala wrote: December 28th, 2018, 1:03 pm Where have you added that UseExifOrientation=0 option? It belongs to the Image meter, not to the Quote plugin measure. So, you should have to add it to the [MeterShowPicture] meter, not to [MeasureMyPictures] measure. But if you didn't add it, the meter should use its default value, which is 0, so the meter shouldn't have to read those EXIF information.
Could you please post one image from those shown up by the skin? Just to check it...

Hi balala! Long time no see.

Yes, I actually tried it in all the different sections, so i did try to add it to MeterShowPicture section. I assumed UseExifOrientation shouldn't work , because I am using the QUOTEPLUGIN, NOT the ImagePlugin for which that code is meant for..


I have PM'ed you a link to the photo... I can reproduce this 100%
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: [Advanced] Preventing Quoteplugin from using EXIF data (ATTN: jmorley)

Post by balala »

mochibear wrote: December 28th, 2018, 6:56 pm Yes, I actually tried it in all the different sections, so i did try to add it to MeterShowPicture section. I assumed UseExifOrientation shouldn't work , because I am using the QUOTEPLUGIN, NOT the ImagePlugin for which that code is meant for..
A such ImagePlugin doesn't exist. The UseExifOrientation=0 option has to be added to the Image meter, not to any measure. Take care to make difference between the measures and meters.
mochibear wrote: December 28th, 2018, 6:56 pm I have PM'ed you a link to the photo... I can reproduce this 100%
No, you didn't (or have deleted the PM). But even if you'd did, would be much better to post it here publicly. Maybe others will have better ideas then me what to do.
mochibear
Posts: 45
Joined: June 3rd, 2014, 11:16 pm

Re: [Advanced] Preventing Quoteplugin from using EXIF data (ATTN: jmorley)

Post by mochibear »

balala wrote: December 28th, 2018, 7:05 pm A such ImagePlugin doesn't exist. The UseExifOrientation=0 option has to be added to the Image meter, not to any measure. Take care to make difference between the measures and meters.
Here's the code:

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=0

[MeasureMyPictures]
Measure=Plugin
Plugin=QuotePlugin
PathName=D:\Sandboxes\Dropbox_PhotoFrame\user\current\Dropbox\
Subfolders=1
FileFilter=*.jpg
UpdateDivider=10

[MeterBackground]
Meter=Image
ImageName=D:\Applications\Rainmeter\Skins\Mochibear\Mochibear Pictures (with thin Frame)\\Background.png
W=1100
H=800
GreyScale=0

[MeterShowPicture]
UseExifOrientation=0
Meter=Image
MeasureName=MeasureMyPictures
X=40
Y=5
W=1024
H=768
PreserveAspectRatio=1
LeftMouseUpAction=[!Refresh]


No, you didn't (or have deleted the PM). But even if you'd did, would be much better to post it here publicly. Maybe others will have better ideas then me what to do.
Good point. Here's the file. I'm at a loss as to why this isn't working. Here's a link that I hope will work: https://www.mediafire.com/file/j4wxq5rxv408l0c/BAD.rar/file
(file is called BAD.rar. It is a JPEG file RAR'ed to prevent any program from stripping EXIF data).


EDIT: just to be thorough, I downloaded the latest beta and ran the script in a "virgin" install and the issue still occurs. Wanted to make sure my Rainmeter config somehow wasn't causing the issue :) We can rule that out now.
Last edited by mochibear on December 28th, 2018, 10:05 pm, edited 2 times in total.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: [Advanced] Preventing Quoteplugin from using EXIF data (ATTN: jmorley)

Post by balala »

mochibear wrote: December 28th, 2018, 7:27 pm Here's a link that I hope will work: {Malicious site link removed} (file is called BAD.rar. It is a JPEG file RAR'ed to prevent any program from stripping EXIF data).

Let me know as I can upload to another if it doesn't.
I got the image, it's ok. But I don't see the issue. If I let the UseExifOrientation=0 option on the [MeterShowPicture] meter, the image is sideways (more exactly rotated 90 degrees anticlockwise). Changing this option to the UseExifOrientation=1, the image isn't rotated, it's standing. But this is exactly how this option has to work: if the option is set to 1, the image is rotated, according to the EXIF information of the image. Otherwise it is not, it is shown as it is.
mochibear wrote: December 28th, 2018, 7:27 pm EDIT: just to be thorough, I downloaded the latest beta and ran the script in a "virgin" install and the issue still occurs. Wanted to make sure my Rainmeter config somehow wasn't causing the issue :) We can rule that out now.
Doesn't worth to reinstall Rainmeter. Almost never helps.
Last edited by eclectic-tech on December 28th, 2018, 10:10 pm, edited 1 time in total.
Reason: OP will provide an alternate link for future reference.
mochibear
Posts: 45
Joined: June 3rd, 2014, 11:16 pm

Re: [Advanced] Preventing Quoteplugin from using EXIF data (ATTN: jmorley)

Post by mochibear »

balala wrote: December 28th, 2018, 8:37 pm I got the image, it's ok. But I don't see the issue. If I let the UseExifOrientation=0 option on the [MeterShowPicture] meter, the image is sideways (more exactly rotated 90 degrees anticlockwise). Changing this option to the UseExifOrientation=1, the image isn't rotated, it's standing. But this is exactly how this option has to work: if the option is set to 1, the image is rotated, according to the EXIF information of the image. Otherwise it is not, it is shown as it is.

Doesn't worth to reinstall Rainmeter. Almost never helps.


I think I misunderstood. The default is ExifOrientation =0, so if it's not there, it'll default to not using EXIF. One would logically assume then it would be treat it the same as a file with no EXIF data. It is NOT doing that which is the odd behavior. This is beginning to smell like a bug/glitch to me as it can't be expected behavior.

So we WANT to use ExifOrientation (hence set it to 1). I would be happy to use the =1 setting, but there's a problem... I changed the UseExifOrientation value from 0 to 1 and it flips it appropriately, but the problem with that is it cuts off the picture due to it being in portrait mode. With no EXIF data it shows it appropriately.

This is using UseExifOrientation = 1: https://i.imgur.com/eZc5xh6.jpg
This is stripping the file of EXIF data and using 0 or 1 (doesn't matter): https://i.imgur.com/vwusfc9.jpg

See the difference? I would like to keep the EXIF data if possible. What options do I have to not cut part of the photo the way it's doing with the exif=1 setting. Please note that I cannot make the actual picture smaller or increase the frame size on the monitor anymore.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: [Advanced] Preventing Quoteplugin from using EXIF data (ATTN: jmorley)

Post by balala »

mochibear wrote: December 28th, 2018, 10:12 pm What options do I have to not cut part of the photo the way it's doing with the exif=1 setting. Please note that I cannot make the actual picture smaller or increase the frame size on the monitor anymore.
Interesting. O.O I don't have such problems.
First try to modify the DynamicWindowSize option of the [Rainmeter] section to 1 (DynamicWindowSize=1).
If this doesn't fix the problem (and I think it doesn't), please pack the whole Mochibear config and upload it here. Please also include at least one more image.
mochibear
Posts: 45
Joined: June 3rd, 2014, 11:16 pm

Re: [BUG?] Quoteplugin using EXIF data innapropriately..

Post by mochibear »

Nope, the dynamic setting to 1 didn't work. I am out of ideas.. :???:

Here's the entire config as you requested. Used mediafire per mods requests: http://www.mediafire.com/file/c0z2rrflxlt6odg/rm_config.rar/file
Password: iloverainmeter
Password: iloverainmeter
Password: iloverainmeter

There's a folder inside there called "Images". There are 4 pictures. 2 are the same, but I stripped the EXIF data from them

bad picture #1 - WITH NO EXIF DATA
bad picture #2 - WITH NO EXIF DATA
bad picture (1)
bad picture (2)
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: [BUG?] Quoteplugin using EXIF data innapropriately..

Post by balala »

Have no idea what to say because (click to animate):
You do not have the required permissions to view the files attached to this post.