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


Permlink Replies: 44 - Pages: 3 [ Previous | 1 2 3 | Next ] - Last Post: 30-Jul-2015 19:16 Last Post By: jGromit
jGromit

Posts: 7,669
Registered: 31-Jan-2006
Re: Add frames and borders in Effects.
Posted: 08-Jul-2014 00:33   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
Attachment bears1.jpg (76.4 KB)
Name: filter1 (no space, case-sensitive)
Value: class=XBorderFilter boWidth=20 boCol=ivory closeups

Produces a slide image like the attached.
jimberry

Posts: 540
Registered: 30-Aug-2004
Re: Add frames and borders in Effects.
Posted: 08-Jul-2014 00:54   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
AndreWolff wrote:
Do I have to install or add a file or is the code for that XBorderFilter standard available in jAlbum 12?
No, nothing to install.

Just to be sure we are on the same page, you put "filter1" in the "Name" column and "class=XBorderFilter boWidth=20 boCol=ivory closeups" in the value column, right?

That should have given you a border on the closeups (slides), but not if you are displaying originals (Link to originals).

In any case, changing line 34 of your common.css (in Slideshow 4) to
img { border: 20px solid ivory; }
would do the trick.

(Or make a specific class for the slide if you don't want the border on thumbnails).

Edited by: jimberry on 08-Jul-2014 09:46
jGromit

Posts: 7,669
Registered: 31-Jan-2006
Re: Add frames and borders in Effects.
Posted: 08-Jul-2014 01:54   in response to: jimberry in response to: jimberry
 
  Click to reply to this thread Reply
jimberry wrote:
In any case, changing line 34 of your common.css (in Slideshow 4) to
img { border: 20px solid ivory; }
would do the trick.

No, it wouldn't. That would put a border around the image. The XBF filter puts the 20px border on top of the image, overlaying the image itself. See my attachment, above.
jGromit

Posts: 7,669
Registered: 31-Jan-2006
Re: Add frames and borders in Effects.
Posted: 08-Jul-2014 03:09   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
It is possible to do an inset border with pure CSS, but it's not exactly what you'd call "straightforward." The problem is that box-shadow with an inset doesn't work on images. You have to some wrapping and finagling:

http://jgromit.jalbum.net/insetBorder/

Here's the source code for the page:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Inset</title>
<style>
.img-shadow {
	position: relative;
	max-width: 100%;
	float: left;
}
.img-shadow::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	box-shadow: inset 0px 0px 0px 20px rgba(255, 255, 240, 0.6);
}
.img-shadow img {
	float: left;
}
</style>
</head>
<body>
<div class="img-shadow"><img src="bears1.jpg" alt="bears1"></div>
</body>
</html>
jimberry

Posts: 540
Registered: 30-Aug-2004
Re: Add frames and borders in Effects.
Posted: 08-Jul-2014 03:55   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
... That would put a border around the image.
And what is wrong with that?

The XBF filter puts the 20px border on top of the image, overlaying the image itself. See my attachment, above.
And who would want to do that?

The only reason I can see would be if you were putting a semi-opaque overlay on the image.
If you want to crop the image, use the crop tool.
mrag

Posts: 405
Registered: 26-Jul-2003
Re: Add frames and borders in Effects.
Posted: 08-Jul-2014 04:25   in response to: jimberry in response to: jimberry
 
  Click to reply to this thread Reply
I thought one could also incorporate jAlbum variables (ex-$fileName) (somehow using Simple XBF) in the XBF frame/border although how totally escapes me right now.

Still escaping.
jimberry

Posts: 540
Registered: 30-Aug-2004
Re: Add frames and borders in Effects.
Posted: 08-Jul-2014 05:02   in response to: mrag in response to: mrag
 
  Click to reply to this thread Reply
Still escaping.
So, not part of your "10 minute" scenario ? ;)

I believe the textfilter will take "text=$fileName" as a parameter (but haven't tested it recently), so maybe XBorderFilter can take JA variables too. Which particular variable would be useful? Maybe the skin has a $borderColor variable?

CSS can also take JA variables, of course, but not image specific variables (unless in the HTML "style" element or attribute).

Edited by: jimberry on 08-Jul-2014 13:16
jGromit

Posts: 7,669
Registered: 31-Jan-2006
Re: Add frames and borders in Effects.
Posted: 08-Jul-2014 07:56   in response to: jimberry in response to: jimberry
 
  Click to reply to this thread Reply
jimberry wrote:
jGromit wrote:
... That would put a border around the image.
And what is wrong with that?

The XBF filter puts the 20px border on top of the image, overlaying the image itself. See my attachment, above.
And who would want to do that?

The only reason I can see would be if you were putting a semi-opaque overlay on the image.


Who would want to do that? Well, Andre would. That's exactly what he asked about.

I guess I'm not explaining this properly. Andre asked about using XBF with the following arguments:

class=XBorderFilter boWidth=20 boCol=ivory closeups

That would place an ivory overlaid border on top of the image, not around the outside of the image. It would, indeed, produce a semi-opaque overlay on the image. That's something that is very difficult to do with CSS.

To summarize, it's a terminology problem:

XBF frame = CSS border

XBF border = CSS box-shadow inset on an absolutely positioned wrapping element
jGromit

Posts: 7,669
Registered: 31-Jan-2006
Re: Add frames and borders in Effects.
Posted: 08-Jul-2014 08:14   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
Once more, for clarity....

XBF: class=XBorderFilter boWidth=20 boCol=ivory closeups

CSS: img { border: 20px solid ivory; }

These two things DO NOT PRODUCE THE SAME RESULT. Not even close.
jimberry

Posts: 540
Registered: 30-Aug-2004
Re: Add frames and borders in Effects.
Posted: 08-Jul-2014 08:23   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
Who would want to do that? Well, Andre would. That's exactly what he asked about.
Not really :)
There is no "boTrans" parameter there, which is what your sample pic would have needed.
jimberry

Posts: 540
Registered: 30-Aug-2004
Re: Add frames and borders in Effects.
Posted: 08-Jul-2014 08:26   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
These two things DO NOT PRODUCE THE SAME RESULT. Not even close.
Exactly. And the CSS solution is probably better, because it doesn't hide any of the picture.
Andre did not ask for a semi-opaque border :).
And the code you provided doesn't produce it.
jGromit

Posts: 7,669
Registered: 31-Jan-2006
Re: Add frames and borders in Effects.
Posted: 08-Jul-2014 08:32   in response to: jimberry in response to: jimberry
 
  Click to reply to this thread Reply
jimberry wrote:
jGromit wrote:
Who would want to do that? Well, Andre would. That's exactly what he asked about.
Not really :)
There is no "boTrans" parameter there, which is what your sample pic would have needed.

I can only conclude that you haven't actually tried it. The XBF values that Andre posted produce exactly what I'm describing. Try it yourself. My sample pic was produced with precisely the XBF values that Andre posted.

And take a look at camner's examples:

http://bppdocs.camner.net/html/xborder/xbf_docs_orig/borders.html

The default value for boTrans is 50%. If you don't specify it, you get semi-opaque.
jGromit

Posts: 7,669
Registered: 31-Jan-2006
Re: Add frames and borders in Effects.
Posted: 08-Jul-2014 08:52   in response to: jGromit in response to: jGromit
Helpful
  Click to reply to this thread Reply
Andre: I followed these directions to drive to Paris, but they didn't get me there.

jimberry: Just follow these simpler directions, which will take you to Marseilles.

jGromit: But those directions don't get you to Paris.

jimberry: Why would anyone want to go to Paris?

Someone's very confused. ;)
AndreWolff

Posts: 1,863
Registered: 14-Dec-2007
Re: Add frames and borders in Effects.
Posted: 08-Jul-2014 08:53   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
Name: filter1 (no space, case-sensitive)
Value: class=XBorderFilter boWidth=20 boCol=ivory closeups

I had a space in front of filter1, I removed it and now it works! Thanks jGromit!

I am amazed that it is so easy to use this, but I think that almost no normal user know this, only developers who read this forum, might see it! And even than there is a big change that it will not be used, because a good graphical interface is missing

I really don't understand the priorities in the development of jAlbum: they spent a lot of effort on an effects panel with functions available in every photo program and to an useless internal browser giving a lot of trouble, while they have an unique feature in house ready to be used in every skin, but it is unknown and useless as long as a good user interface is lacking in jAlbum!

So what I did ask in this thread is already there, but unknown to the general audience. I think the first priority of David and his crew is to extend jAlbum with a user interface so that all users can implement these borders and frames for all photos in their albums!
AndreWolff

Posts: 1,863
Registered: 14-Dec-2007
Re: Add frames and borders in Effects.
Posted: 08-Jul-2014 09:09   in response to: jimberry in response to: jimberry
 
  Click to reply to this thread Reply
jimberry wrote:
In any case, changing line 34 of your common.css (in Slideshow 4) to
img { border: 20px solid ivory; }
would do the trick.

(Or make a specific class for the slide if you don't want the border on thumbnails).

Thanks you too for your help Jim.

I prefer to take advantage of the work which is already done by others!

Making a new skin for such a feature sounds unwise for me: there are already too many skins, it is difficult for new users to make a choice.
It is far better to develop the central features in jAlbum which are in that case available for all jAlbum skins. Making a good graphical interface to the XborderFilter should be the first priority!
Legend
Forum admins
Helpful Answer
Correct Answer

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