PhotoFiltre

Le forum officiel de PhotoFiltre
Nous sommes le 21 Jan 2018 13:46

Heures au format UTC + 1 heure




Poster un nouveau sujet Répondre au sujet  [ 14 messages ] 
Auteur Message
 Sujet du message: "Unable to load image in file" when directly opening (Skype)
MessagePosté: 24 Avr 2015 19:26 
Hors ligne
Nouveau(elle)
Nouveau(elle)|Nouveau|Nouvelle

Inscription: 24 Avr 2015 19:16
Messages: 9
Sexe: Non spécifié
Version de PhotoFiltre: PhotoFiltre Studio X 10.9.2
Système d'exploitation: 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


Dernière édition par Ray Koopa le 10 Nov 2015 22:49, édité 1 fois.

Haut
 Profil  
 
 Sujet du message: Re: "Unable to load image in file" when directly opening (Sk
MessagePosté: 25 Avr 2015 7:09 
Hors ligne
Administrateur(trice)
Administrateur(trice)|Administrateur|Administratrice

Inscription: 28 Oct 2003 22:49
Messages: 10823
Sexe: Non spécifié
It is right, unicode are not supported.
In your sample, your usernames have spacing ?


Haut
 Profil  
 
 Sujet du message: Re: "Unable to load image in file" when directly opening (Sk
MessagePosté: 26 Avr 2015 11:03 
Hors ligne
Nouveau(elle)
Nouveau(elle)|Nouveau|Nouvelle

Inscription: 24 Avr 2015 19:16
Messages: 9
Sexe: Non spécifié
Version de PhotoFiltre: PhotoFiltre Studio X 10.9.2
Système d'exploitation: Windows 8.1 Update 1
Yes, my Windows username has a space between first and last name.
The Skype name has none.


Haut
 Profil  
 
 Sujet du message: Re: "Unable to load image in file" when directly opening (Sk
MessagePosté: 26 Avr 2015 15:02 
Hors ligne
Administrateur(trice)
Administrateur(trice)|Administrateur|Administratrice

Inscription: 28 Oct 2003 22:49
Messages: 10823
Sexe: Non spécifié
i think it is the bug...


Haut
 Profil  
 
 Sujet du message: Re: "Unable to load image in file" when directly opening (Sk
MessagePosté: 29 Avr 2015 19:40 
Hors ligne
Nouveau(elle)
Nouveau(elle)|Nouveau|Nouvelle

Inscription: 24 Avr 2015 19:16
Messages: 9
Sexe: Non spécifié
Version de PhotoFiltre: PhotoFiltre Studio X 10.9.2
Système d'exploitation: 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.


Haut
 Profil  
 
 Sujet du message: Re: "Unable to load image in file" when directly opening (Sk
MessagePosté: 29 Avr 2015 20:18 
Hors ligne
Administrateur(trice)
Administrateur(trice)|Administrateur|Administratrice

Inscription: 28 Oct 2003 22:49
Messages: 10823
Sexe: Non spécifié
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


Haut
 Profil  
 
 Sujet du message: Re: "Unable to load image in file" when directly opening (Sk
MessagePosté: 10 Mai 2015 13:27 
Hors ligne
Nouveau(elle)
Nouveau(elle)|Nouveau|Nouvelle

Inscription: 24 Avr 2015 19:16
Messages: 9
Sexe: Non spécifié
Version de PhotoFiltre: PhotoFiltre Studio X 10.9.2
Système d'exploitation: Windows 8.1 Update 1
Yeah, when associating PNG and JPG and other files, Windows wrapped my %1 paths in quotes.


Haut
 Profil  
 
 Sujet du message: Re: "Unable to load image in file" when directly opening (Sk
MessagePosté: 04 Juil 2015 11:28 
Hors ligne
Nouveau(elle)
Nouveau(elle)|Nouveau|Nouvelle

Inscription: 24 Avr 2015 19:16
Messages: 9
Sexe: Non spécifié
Version de PhotoFiltre: PhotoFiltre Studio X 10.9.2
Système d'exploitation: 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...


Dernière édition par Ray Koopa le 10 Nov 2015 22:49, édité 1 fois.

Haut
 Profil  
 
 Sujet du message: Re: "Unable to load image in file" when directly opening (Sk
MessagePosté: 04 Juil 2015 13:46 
Hors ligne
Administrateur(trice)
Administrateur(trice)|Administrateur|Administratrice

Inscription: 28 Oct 2003 22:49
Messages: 10823
Sexe: Non spécifié
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 ?


Haut
 Profil  
 
 Sujet du message: Re: "Unable to load image in file" when directly opening (Sk
MessagePosté: 16 Juil 2015 16:28 
Hors ligne
Nouveau(elle)
Nouveau(elle)|Nouveau|Nouvelle

Inscription: 24 Avr 2015 19:16
Messages: 9
Sexe: Non spécifié
Version de PhotoFiltre: PhotoFiltre Studio X 10.9.2
Système d'exploitation: 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.


Haut
 Profil  
 
 Sujet du message: Re: "Unable to load image in file" when directly opening (Sk
MessagePosté: 16 Juil 2015 18:01 
Hors ligne
Nouveau(elle)
Nouveau(elle)|Nouveau|Nouvelle

Inscription: 24 Avr 2015 19:16
Messages: 9
Sexe: Non spécifié
Version de PhotoFiltre: PhotoFiltre Studio X 10.9.2
Système d'exploitation: 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.)


Dernière édition par Ray Koopa le 10 Nov 2015 22:50, édité 1 fois.

Haut
 Profil  
 
 Sujet du message: Re: "Unable to load image in file" when directly opening (Sk
MessagePosté: 16 Juil 2015 18:37 
Hors ligne
Administrateur(trice)
Administrateur(trice)|Administrateur|Administratrice

Inscription: 28 Oct 2003 22:49
Messages: 10823
Sexe: Non spécifié
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:


Haut
 Profil  
 
 Sujet du message: Re: "Unable to load image in file" when directly opening (Sk
MessagePosté: 17 Sep 2015 18:06 
Hors ligne
Nouveau(elle)
Nouveau(elle)|Nouveau|Nouvelle

Inscription: 24 Avr 2015 19:16
Messages: 9
Sexe: Non spécifié
Version de PhotoFiltre: PhotoFiltre Studio X 10.9.2
Système d'exploitation: 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.


Haut
 Profil  
 
 Sujet du message: Re: "Unable to load image in file" when directly opening (Sk
MessagePosté: 26 Sep 2017 16:56 
Hors ligne
Nouveau(elle)
Nouveau(elle)|Nouveau|Nouvelle

Inscription: 19 Sep 2017 10:47
Messages: 1
Sexe: Non spécifié
Is anyone else still having this issue?


Haut
 Profil  
 
Afficher les messages postés depuis:  Trier par  
Poster un nouveau sujet Répondre au sujet  [ 14 messages ] 

Heures au format UTC + 1 heure


Qui est en ligne

Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 6 invités


Vous ne pouvez pas poster de nouveaux sujets
Vous ne pouvez pas répondre aux sujets
Vous ne pouvez pas éditer vos messages
Vous ne pouvez pas supprimer vos messages

Rechercher:
Aller à:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Traduction par: phpBB-fr.com