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


Permlink Replies: 56 - Pages: 4 [ Previous | 1 2 3 4 ] - Last Post: 26-Mar-2017 15:16 Last Post By: jimberry
jGromit

Posts: 7,792
Registered: 31-Jan-2006
Re: Where is the crop focus tool for a thumbnail??
Posted: 23-Mar-2017 22:16   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Attachment kitty.png (13.7 KB)
Maybe you should just go with a picture of a kitty. Everybody likes kitties.
RobM

Posts: 3,175
Registered: 4-Aug-2006
Re: Where is the crop focus tool for a thumbnail??
Posted: 23-Mar-2017 22:39   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Got it, finally by reworking the dimensions and using the cropFocus SVG structure. But why did I have to? SVG code
<?xml version="1.0" encoding="utf-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">
<title>Slide Boundsr</title>
<rect x="0" y="6" width="10" height="5" fill="lightblue" />
<text x="0" y="10" font-family="Verdana" font-size="4px" fill="black">←</text>
<text x="6" y="10" font-family="Verdana" font-size="4px" fill="black">→</text>
<rect x="11" y="3" width="5" height="10" fill="lightblue" />
<text x="12" y="7" font-family="Verdana" font-size="4px" fill="black">↑</text>
<text x="12" y="12" font-family="Verdana" font-size="4px" fill="black">↓</text>
</svg>
.

Updating plugin in a few minutes.
RobM

Posts: 3,175
Registered: 4-Aug-2006
Re: Where is the crop focus tool for a thumbnail??
Posted: 23-Mar-2017 22:41   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
Maybe you should just go with a picture of a kitty. Everybody likes kitties.
Not me, I detest them and even more so once they have grown to become a moggy.
jimberry

Posts: 527
Registered: 30-Aug-2004
Re: Where is the crop focus tool for a thumbnail??
Posted: 24-Mar-2017 03:23   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
... ... but produces this error
Mar 23, 2017 9:05:37 PM com.kitfox.svg.SVGUniverse getElement
WARNING: Could not parse path svgSalamander:/null
java.net.MalformedURLException: unknown protocol: svgsalamander

I think this might indicate a problem with the third party libraries that jAlbum uses to process SVG files (there has never been any native Java support for SVG).

Maybe David can give some insight into what extra code is really required to allow the Salamander libraries to process SVG without triggering an error that non-java applications appear to ignore.
davidekholm

Posts: 3,502
Registered: 18-Oct-2002
Re: Where is the crop focus tool for a thumbnail??
Posted: 24-Mar-2017 13:29   in response to: jimberry in response to: jimberry
 
  Click to reply to this thread Reply
I can confirm that jAlbum's SVG support is a bit limited. Styles are for instance not working. Unzip jalbum-core.jar and inspect the embedded .svg's to see what works. The most advanced svg icon is probably Dor's head (attached)
jGromit

Posts: 7,792
Registered: 31-Jan-2006
Re: Where is the crop focus tool for a thumbnail??
Posted: 24-Mar-2017 13:51   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
jGromit wrote:
Maybe you should just go with a picture of a kitty. Everybody likes kitties.
Not me, I detest them and even more so once they have grown to become a moggy.

Funny, I had no idea you were actually a bad person. ;)
jimberry

Posts: 527
Registered: 30-Aug-2004
Re: Where is the crop focus tool for a thumbnail??
Posted: 24-Mar-2017 14:44   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
It would appear that there are four elements (or pairs of elements) missing from the <svg> tag of the "failing" SVG, that exist in the "working" SVGs, and if they are then included in the "failing" SVG it now works, but I do not know which elements are obligatory for Salamander.
These are -
	x="0px" y="0px"
	width="32px" height="32px" 
	enable-background="new 0 0 32 32" 
	xml:space="preserve">  

Can you confirm which of these are really necessary and which are still optional?

Is this a bug in Salamander?
jimberry

Posts: 527
Registered: 30-Aug-2004
Re: Where is the crop focus tool for a thumbnail??
Posted: 25-Mar-2017 02:50   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
After some experimentation, it appears that the error was triggered by the absence of
xml:space="preserve"
in the <svg> element.

This might seem ironic, as in these cases there is no text in the graphic where spaces could be either collapsed or preserved.
RobM

Posts: 3,175
Registered: 4-Aug-2006
Re: Where is the crop focus tool for a thumbnail??
Posted: 25-Mar-2017 23:19   in response to: jimberry in response to: jimberry
 
  Click to reply to this thread Reply
jimberry wrote:
After some experimentation, it appears that the error was triggered by the absence of
xml:space="preserve"
in the <svg> element.

This might seem ironic, as in these cases there is no text in the graphic where spaces could be either collapsed or preserved.

Thanks Jim, this could come in handy if I do any more svgs. Thanks to jAlbum Deals I just got a lifetime license to Biff which supports exporting to svg. :)
jimberry

Posts: 527
Registered: 30-Aug-2004
Re: Where is the crop focus tool for a thumbnail??
Posted: 26-Mar-2017 01:44   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Thankyou, Rob, for posting the error report that pointed me in the right direction.

I had previously given up on my efforts to include SVGs in a jalbum java skin UI. I knew that Sweden was using them but couldn't understand why it was beyond this old geezer ;).

By the way you might want to alter the SVG title from "Slide boundsr" to "Slide bounds" - mea culpa (it was a typo in the slideBounds02.svg that I attached as an example, but people looking at your code might blame you!)
RobM

Posts: 3,175
Registered: 4-Aug-2006
Re: Where is the crop focus tool for a thumbnail??
Posted: 26-Mar-2017 12:12   in response to: jimberry in response to: jimberry
 
  Click to reply to this thread Reply
jimberry wrote:
Thankyou, Rob, for posting the error report that pointed me in the right direction.

I had previously given up on my efforts to include SVGs in a jalbum java skin UI. I knew that Sweden was using them but couldn't understand why it was beyond this old geezer ;).

By the way you might want to alter the SVG title from "Slide boundsr" to "Slide bounds" - mea culpa (it was a typo in the slideBounds02.svg that I attached as an example, but people looking at your code might blame you!)

I can live with that, I'll just say it stands for slide bounds Revised ;)
jimberry

Posts: 527
Registered: 30-Aug-2004
Re: Where is the crop focus tool for a thumbnail??
Posted: 26-Mar-2017 15:16   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
:)
Legend
Forum admins
Helpful Answer
Correct Answer

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