PhotoFiltre

Le forum officiel de PhotoFiltre
It is currently 24 Jun 2019 15:19

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 14 posts ] 
Author Message
 Post subject: "Unable to load image in file" when directly opening (Skype)
PostPosted: 24 Apr 2015 20:26 
Offline
Nouveau(elle)
Nouveau(elle)|Nouveau|Nouvelle

Joined: 24 Apr 2015 20:16
Posts: 9
Gender: None specified
PhotoFiltre version: PhotoFiltre Studio X 10.9.2
Operating System: Windows 8.1 Update 1
I have a really weird issue since some recent Skype versions. Image files sent to me and opened directly through Skype refuse to open.
PhotoFiltre just shows the following error message (my usernames have been blanked):

The file _does_ exist and it can even be opened manually. It just doesn't work when opening it directly from Skype.
It happens to both PNG or JPG files, so I think the file format doesn't matter. It seems to be a bug elsewhere.

On a side note, I noticed the same issue with file names containing unicode characters, they refuse to open on direct startup.

Can I provide more information to help fixing this bug? It makes me a bit nervous, as I often receive images through Skype :3c


Last edited by Ray Koopa on 10 Nov 2015 23:49, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: "Unable to load image in file" when directly opening (Sk
PostPosted: 25 Apr 2015 8:09 
Offline
Administrateur(trice)
Administrateur(trice)|Administrateur|Administratrice

Joined: 28 Oct 2003 23:49
Posts: 11161
Gender: None specified
It is right, unicode are not supported.
In your sample, your usernames have spacing ?


Top
 Profile  
 
 Post subject: Re: "Unable to load image in file" when directly opening (Sk
PostPosted: 26 Apr 2015 12:03 
Offline
Nouveau(elle)
Nouveau(elle)|Nouveau|Nouvelle

Joined: 24 Apr 2015 20:16
Posts: 9
Gender: None specified
PhotoFiltre version: PhotoFiltre Studio X 10.9.2
Operating System: Windows 8.1 Update 1
Yes, my Windows username has a space between first and last name.
The Skype name has none.


Top
 Profile  
 
 Post subject: Re: "Unable to load image in file" when directly opening (Sk
PostPosted: 26 Apr 2015 16:02 
Offline
Administrateur(trice)
Administrateur(trice)|Administrateur|Administratrice

Joined: 28 Oct 2003 23:49
Posts: 11161
Gender: None specified
i think it is the bug...


Top
 Profile  
 
 Post subject: Re: "Unable to load image in file" when directly opening (Sk
PostPosted: 29 Apr 2015 20:40 
Offline
Nouveau(elle)
Nouveau(elle)|Nouveau|Nouvelle

Joined: 24 Apr 2015 20:16
Posts: 9
Gender: None specified
PhotoFiltre version: PhotoFiltre Studio X 10.9.2
Operating System: Windows 8.1 Update 1
Can you fix it? I cannot rename my Windows profile (even if I would, the folder name would still be the same).
I can try a new user account without a space though.


Top
 Profile  
 
 Post subject: Re: "Unable to load image in file" when directly opening (Sk
PostPosted: 29 Apr 2015 21:18 
Offline
Administrateur(trice)
Administrateur(trice)|Administrateur|Administratrice

Joined: 28 Oct 2003 23:49
Posts: 11161
Gender: None specified
Not sure the bug is in PFS...

First edit the windows association for the type jpeg with windows file explorer.
Check that %1 is enclosed like this "%1" in the open key


Top
 Profile  
 
 Post subject: Re: "Unable to load image in file" when directly opening (Sk
PostPosted: 10 May 2015 14:27 
Offline
Nouveau(elle)
Nouveau(elle)|Nouveau|Nouvelle

Joined: 24 Apr 2015 20:16
Posts: 9
Gender: None specified
PhotoFiltre version: PhotoFiltre Studio X 10.9.2
Operating System: Windows 8.1 Update 1
Yeah, when associating PNG and JPG and other files, Windows wrapped my %1 paths in quotes.


Top
 Profile  
 
 Post subject: Re: "Unable to load image in file" when directly opening (Sk
PostPosted: 04 Jul 2015 12:28 
Offline
Nouveau(elle)
Nouveau(elle)|Nouveau|Nouvelle

Joined: 24 Apr 2015 20:16
Posts: 9
Gender: None specified
PhotoFiltre version: PhotoFiltre Studio X 10.9.2
Operating System: Windows 8.1 Update 1
That also doesn't seem to be the problem. I moved such an image to "D:\Pictures\a.jpg" and opened it manually, and it didn't want to load it.
Must be the image data itself, as it seems. I uploaded the screenshot someone sent me here:
EDIT: Funny enough, it's actually a PNG, but Skype seems to store them with a JPG extension. That might already be the problem. The extension cant be trusted...


Last edited by Ray Koopa on 10 Nov 2015 23:49, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: "Unable to load image in file" when directly opening (Sk
PostPosted: 04 Jul 2015 14:46 
Offline
Administrateur(trice)
Administrateur(trice)|Administrateur|Administratrice

Joined: 28 Oct 2003 23:49
Posts: 11161
Gender: None specified
it can not be a jpeg because i see transparency in your screen :wink:
Perhaps a png, can you post this image here to test ?


Top
 Profile  
 
 Post subject: Re: "Unable to load image in file" when directly opening (Sk
PostPosted: 16 Jul 2015 17:28 
Offline
Nouveau(elle)
Nouveau(elle)|Nouveau|Nouvelle

Joined: 24 Apr 2015 20:16
Posts: 9
Gender: None specified
PhotoFiltre version: PhotoFiltre Studio X 10.9.2
Operating System: Windows 8.1 Update 1
Yeah, I will, when I'm at home (check back in 2 hours). =3

Basically, just rename a JPG to .png and try to open it.
Skype seems to be stupid enough to always append ".jpg" to the image, nevertheless of the real format in it. Most programs don't trust these extensions for security reasons, and try to find the correct image loader by looking at the image data, but PFX is tricked into trying to load the PNG as a JPG due to the extension given, and then just shows this error.

Thanks for your quick replies until now, as said, a problematic image will follow soon.


Top
 Profile  
 
 Post subject: Re: "Unable to load image in file" when directly opening (Sk
PostPosted: 16 Jul 2015 19:01 
Offline
Nouveau(elle)
Nouveau(elle)|Nouveau|Nouvelle

Joined: 24 Apr 2015 20:16
Posts: 9
Gender: None specified
PhotoFiltre version: PhotoFiltre Studio X 10.9.2
Operating System: Windows 8.1 Update 1
Here is the image:

(That is exactly the dumb name Skype gives. Notice it's a PNG image actually, but with JPG extension. Copy the whole link manually to open it.)


Last edited by Ray Koopa on 10 Nov 2015 23:50, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: "Unable to load image in file" when directly opening (Sk
PostPosted: 16 Jul 2015 19:37 
Offline
Administrateur(trice)
Administrateur(trice)|Administrateur|Administratrice

Joined: 28 Oct 2003 23:49
Posts: 11161
Gender: None specified
When i save it with Firefox, Firefox add th extention .png and i can open it with PhotoFiltre.

Of course if i remove the extension .png, PhotoFiltre will open it as a jpeg and display an error message :wink:


Top
 Profile  
 
 Post subject: Re: "Unable to load image in file" when directly opening (Sk
PostPosted: 17 Sep 2015 19:06 
Offline
Nouveau(elle)
Nouveau(elle)|Nouveau|Nouvelle

Joined: 24 Apr 2015 20:16
Posts: 9
Gender: None specified
PhotoFiltre version: PhotoFiltre Studio X 10.9.2
Operating System: Windows 8.1 Update 1
Yeah, I know that.

But a program should never rely on file extension (mostly due to security reasons, and a bug like this)...

Right now PhotoFiltre does rely on the file extension.

A correct, non-breaking change would be:
- Try to use the file extension.
- If the loader returns an error, don't show it to user, and try probing for the real image type (by checking the file header etc)
- If one is matched, try loading with that.
- If it still doesn't work, show error.

Do you think that can be made possible? =3

Of course, if probing is tested successfully and working well, a good program would just behave like this.
- Probing for the real image type (by checking the file header etc)
- If one is matched, try loading with that.
- If it doesn't work, show error.

I did this once for a game engine which required loading of WAV, OGG and MP3 files. Each filetype was programmed in a subclass of a Loader class, and offered a "Probe" method returning a boolean whether if it matches this type. The Probe method basically just loaded the header and looked if the stats given in it are valid (if possible).

When loading an image then, I just called the Probe method of each instance I made of each subclass, and used the first returning true.
It can now load WAV files correctly, even though if a dumb user or program renamed it to MP3 or TXT or whatever.

I wrote myself a "preloader" for PFS checking the file type by the image data, and creating a copy with correct extension before passing it to PFS.


Top
 Profile  
 
 Post subject: Re: "Unable to load image in file" when directly opening (Sk
PostPosted: 26 Sep 2017 17:56 
Offline
Nouveau(elle)
Nouveau(elle)|Nouveau|Nouvelle

Joined: 19 Sep 2017 11:47
Posts: 1
Gender: None specified
Antoenio wrote:
When i save it with Firefox, Firefox add the fat burners for women extention .png and i can open it with PhotoFiltre.

Of course if i remove the extension .png, PhotoFiltre will open it as a jpeg and display an error message :wink:


Is anyone else still having this issue?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group