Unable to import png?

I saw a bug for an earlier version regarding this, but it looked resolved.

I can’t import pngs, for some reason. I was using a development build, and I had several pngs. Randomly, they would disappear–they would be invisible. Even if I closed the file without saving, when I opened them up again, they would be gone. If I re-imported them they would be fine . . . until they randomly turned invisible and unalterable.

I downloaded the latest stable version of synfig to see if the problem was just with the development build, but this time when I try to import the pngs, I just get an error message that says “Unable to import file name

When I try this on a blank canvas, it seems fine. But the blank canvas doesn’t have the rest of the animation…Anyone know what the problem is? Is there some element I created in the animation that creates a png import bug?

If you want your problem to be solved, it’s a good idea to upload problematic file and mention your platform.

So it’s not a common problem then?

Here is one of the problem files.
exploding chess pieces.sifz (3.11 KB)

You use PNG files from other directories with spaces…

[code]
…/…/…/…/\Brandon\Videos\animation experiments\chess bg removed\bN.png

[/code] Avoid such practices, paths may be wrong as they are relative and spaces are evil. Group the resources in the animation project. See https://forums.synfig.org/t/imported-images-dissapear/3729/1

P.S.: We don’t have your PNGs :wink:

How do I send my PNGs? That’s why I didn’t bother attaching it the first time.

But also, I can no longer import any PNGs into that canvas. It’s like the whole file is bugged out. Is anyone else able to import their own PNGs into the file?

Thanks for the link. As far as I can tell, I don’t have any of those problems, unless it’s a file name thing (but I can’t import from file names without spaces, and I can import from file names with spaces, in other synfig canvases).

The solution in your case (already discussed several times in this forum):

  • Extract your .sifz file (you can rename it as .zip under Windows)
  • Open it in a text editor
  • Find all the occurences of your PNGs path
  • Modify them to be in the same directory as your project file
  • Save it / Recompress if needed

Maybe they are files with transparency, check your alpha value for these layers
And don’t mix versions of Synfig to cretae/open your projects

Btw you didn’t tell us which OS you use
For Windows for example, use the correct slashes …

Goodness it is hard to join this forum, those confirmation codes are inhuman! Like is an ai making them? Had to use gimp and adjust colour codes just to make them legible, then 32 attempts later, managed it. Anyway, had the same problem. I could not import pngs, jpgs, or even inkscape files formatted for synfig. I also had several pngs Randomly, disappear. If i saved the file, they would be missing when I re-opened the file again. For me too, they randomly turned invisible and unalterable. such a tease!

I got messages saying: string 88 layer ‘import’ rejected value for parameter ‘filename’
I also got the message: unable to import
also I got the message can’t find linked file “#project.sif”
I am in windows 10. My synfig images were not in a standard directory.

Someone suggested unhelpfully that the file should be uploaded, to solve the problem, but as I could not import any files, then all that would be uploaded would be an empty file, which I could not see as at all helpful!

Anyway someone said save the file and open it in notepad. This was helpful, and showed that the file names had changed to …/…/Program Files (x86)\Synfig\binMyDocuments\synfig\Bonestut01.png.

I saved and re-changed these file names so the / were all the same, ie , but this did not take. my SOLUTION was to put the images in the synfig directory in the program file (not at all desirable), but it works fine there.

This make me think that the programming problem is in the c++ constant that is used in the file path link string function for windows 10. I would guess it needs to be changed so that the / are \