This question is not answered. Helpful answers available: 1. Correct answers available: 1.


Permlink Replies: 17 - Pages: 2 [ 1 2 | Next ] - Last Post: 04-Apr-2017 21:42 Last Post By: AndreWolff Threads: [ Previous | Next ]
AndreWolff

Posts: 1,841
Registered: 14-Dec-2007
Svg files not displayed in Explore and not copied to output res folder.
Posted: 30-Mar-2017 19:39
 
  Click to reply to this thread Reply
In the Slide Show 4 skin I am replacing all .png files for buttons by .svg files, see this album.
I replaced all .png strings by .svg strings in index.htt etc. replaced all .png files by .svg files and the result is OK.

But this album has one button which may be chosen by the user, the icon in the "links" tool-bar above the thumbnails, where in this example the jAlbum frog is used. The extra images are in a sub-folder AuxPictures of the images folder, see the attached Windows explore screen shot 1. This was formerly file Jalbum-icon.png and now I tried it with file dor-32-gradient.svg

The first problem is this: The dor-32-gradient.svg file is not visible in the jAlbum explore, see attached jAlbum screen shot 2. Why not?

Via a the function getFileToRes the icon is copied to the res folder in the images folder, see screen shot 3

If I next make the album, I encountered the second problem: file dor-32-gradient.svg is not copied to the res directory in the output folder, so it is not displayed in the index page, unless I manually load file dor-32-gradient.svg into the res directory of the output directory.
jGromit

Posts: 7,651
Registered: 31-Jan-2006
Re: Svg files not displayed in Explore and not copied to output res folder.
Posted: 30-Mar-2017 20:40   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
Deleted - let Andre work this out for himself. I was an idiot to think he actually wanted help. Last time, ever.

Edited by: jGromit on 30-Mar-2017 16:20
AndreWolff

Posts: 1,841
Registered: 14-Dec-2007
Re: Svg files not displayed in Explore and not copied to output res folder.
Posted: 30-Mar-2017 21:35   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
Because jAlbum doesn't recognize an SVG file as a file type it supports.
Then there is work to do: jAlbum should full support svg files as it does with png files!
And jAlbum ignores it, for the same reason.
Incorrect, the function getFileToRescopies copies thedor-32-gradient.svg file to the res folder, see 3-WindowsIMGResfolderr screen shot.
Because it's not in the res folder of the image directory.
Incorrect, see see 3-WindowsIMGResfolderr screen shot.
Better approach: ...
Thanks for the suggestion, but I am not going to study this method!
I think jAlbum should give full support to .svg files!
If my method works with .jpeg and .png files, it should be as well work with svg files!
RobM

Posts: 3,201
Registered: 4-Aug-2006
Re: Svg files not displayed in Explore and not copied to output res folder.
Posted: 30-Mar-2017 22:09   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
AndreWolff wrote:
The first problem is this: The dor-32-gradient.svg file is not visible in the jAlbum explore, see attached jAlbum screen shot 2. Why not?
The svg is not rendered in Windows, why not?
jGromit

Posts: 7,651
Registered: 31-Jan-2006
Re: Svg files not displayed in Explore and not copied to output res folder.
Posted: 30-Mar-2017 22:20   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
AndreWolff wrote:
Thanks for the suggestion, but I am not going to study this method!

OK. I'll just delete all of it. You obviously know best, as always. Looking forward to your solution.

I think jAlbum should give full support to .svg files!

We'll let you know when that happens.
AndreWolff

Posts: 1,841
Registered: 14-Dec-2007
Re: Svg files not displayed in Explore and not copied to output res folder.
Posted: 30-Mar-2017 22:22   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
The svg is not rendered in Windows, why not?
?? If I copy file dor-32-gradient.svg manually to the output res folder, the frog is visible in Windows as you can see here
jGromit

Posts: 7,651
Registered: 31-Jan-2006
Re: Svg files not displayed in Explore and not copied to output res folder.
Posted: 30-Mar-2017 22:25   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
Attachment ss002693.png (37.9 KB)
That's not Windows. That's a browser.

Windows doesn't have a clue about what to do with it.
RobM

Posts: 3,201
Registered: 4-Aug-2006
Re: Svg files not displayed in Explore and not copied to output res folder.
Posted: 30-Mar-2017 22:28   in response to: AndreWolff in response to: AndreWolff
Helpful
  Click to reply to this thread Reply
Open the filetypes.xml file in the jAlbum application folder and add svg to the list, either the xml or Unsupported image. And yes, you will have to do this again if jAlbum is updated.
jGromit

Posts: 7,651
Registered: 31-Jan-2006
Re: Svg files not displayed in Explore and not copied to output res folder.
Posted: 30-Mar-2017 22:38   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
Open the filetypes.xml file in the jAlbum application folder and add svg to the list, either the xml or Unsupported image. And yes, you will have to do this again if jAlbum is updated.

That takes care of the res copying problem, but if you then add an SVG to an album project (not in the res folder, but just in the main folder), you get some unpleasant results. I tried adding SVG to the list of unsupported image types, for example, then made an album with Minimal. Weird thumbnail, and no slide page.

In any event, I wouldn't want to send every user off to edit filetypes.xml. Lots of potential for trouble there.
RobM

Posts: 3,201
Registered: 4-Aug-2006
Re: Svg files not displayed in Explore and not copied to output res folder.
Posted: 30-Mar-2017 22:42   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
Fully agree, it was only a suggestion as a one off for as Andre considers it critical for his use. No one else has asked for svg support as part of the project directory, and skin developers using svg normally write their own code.
jGromit

Posts: 7,651
Registered: 31-Jan-2006
Re: Svg files not displayed in Explore and not copied to output res folder.
Posted: 30-Mar-2017 22:42   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
So, RobM, Brexit is underway! The Scots, of course, want to hold another referendum on independence, but May won't let them. I feel armed conflict coming on!!

Scots Wha hae wi' Wallace Bled.
RobM

Posts: 3,201
Registered: 4-Aug-2006
Re: Svg files not displayed in Explore and not copied to output res folder.
Posted: 30-Mar-2017 22:50   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
So, RobM, Brexit is underway! The Scots, of course, want to hold another referendum on independence, but May won't let them. I feel armed conflict coming on!!

Scots Wha hae wi' Wallace Bled.

Yes, at last :)
NS has said the Scots should have all of the facts before making a decision, at which point whatever the deal between the UK & EU she will recommend they vote for independence. If the SNP loose their referendum they will just write into their manifesto that they will hold another referendum if the Tories or Labour get elected in the next General Election.

The SNP are like the Bremainers, they should keep having referendum until they get the right answer (for them).
jGromit

Posts: 7,651
Registered: 31-Jan-2006
Re: Svg files not displayed in Explore and not copied to output res folder.
Posted: 30-Mar-2017 22:57   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
But the Scottish consensus on Brexit was pretty unequivocal. It's not really a matter of holding repeated independence referenda until SNP gets the result it wants - it's a matter of the "ground truth" having changed drastically since the last referendum. "Where are we going, and why are we all in this handbasket?"

Hard to believe they're going to like whatever deal May can work out. The EU isn't a cafeteria, where you can pick and choose what you want.
RobM

Posts: 3,201
Registered: 4-Aug-2006
Re: Svg files not displayed in Explore and not copied to output res folder.
Posted: 30-Mar-2017 23:18   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
The point is, it doesn't matter what the deal is, she has said she will recommend independence regardless. However unlikely, if the UK got a really good deal it would not matter. The SNP want independence, I'm not convinced the Scottish people do, not just yet anyway.

It is there choice though, and once the UK has left the EU if they want independence they should have it. But for now the UK voted to leave the EU and that takes precedence (they knew the EU referendum was coming when they voted last time, if they didn't factor in the possible result we got that is their problem).
AndreWolff

Posts: 1,841
Registered: 14-Dec-2007
Re: Svg files not displayed in Explore and not copied to output res folder.
Posted: 04-Apr-2017 09:45   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
Open the filetypes.xml file in the jAlbum application folder and add svg to the list, either the xml or Unsupported image. And yes, you will have to do this again if jAlbum is updated.
I did extend the section "Unsupported image":
	<type name="Unsupported image" icon="image.png">
		<ext>nef</ext>
		<ext>psd</ext>
		<ext>ico</ext>
		<ext>svg</ext>
	</type>
and indeed that solves the problem temporarely.

I hope this will be a standard addition in the next jAlbum release.

Thanks for your help!
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums