Thread Locked This thread is locked - replies are not allowed.


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


Permlink Replies: 18 - Pages: 2 [ 1 2 | Next ] - Last Post: 19 Jul 21, 00:27 Last Post By: JeffTucker Threads: [ Previous | Next ]
rfm2

Posts: 68
Registered: 13-Dec-2007
Neptune 63: video overlay opacity
Posted: 14 Jul 21, 23:36
 
I have used a line of code in the UI to set the video overlay opacity at 90% for all recent albums. The line I use is:

.ne-videooverlay img {width: 28px; height: 28px; opacity: 0.90; top: 20px; left:20px; margin: -15px !important;}

Now when I re-make any of the albums with the video overlay using version 63 the opacity is not applied, apparently defaulting to an apparent 0.50. Has something changed in 63 that prohibits the use of opacity? It was working in 62.
JeffTucker

Posts: 8,362
Registered: 31-Jan-2006
Re: Neptune 63: video overlay opacity
Posted: 15 Jul 21, 00:11   in response to: rfm2 in response to: rfm2
 
Attachment video.svg (38.8 KB)
The skin isn't applying any opacity to that overlay graphic at all - it's effectively 1.0. Try setting it to 0.6 or 0.5, for example, and you'll find that it becomes almost invisible.

The change actually goes back quite a few versions (all the way to v.33, in fact). In short, the graphic that I'm using is already a semi-transparent "medium gray on very light gray." It's not a stark "black on white" to begin with. That does mean, however, that you can't make it darker than it is. Open the skin directory, head for resopt, and open video.svg, and you'll see what I mean.

You could swap out the video.svg file for a darker version, which would give you a larger range of opacity to play with. In your project, at the top level, create your own res folder, which jAlbum will show dimmed out. Open it, and add the attached file to it. It's the fully-opaque version of the graphic that I actually started with. This will override the version that's built into the skin. Make the album again, and do some CTRL-F5 refreshing.
rfm2

Posts: 68
Registered: 13-Dec-2007
Re: Neptune 63: video overlay opacity
Posted: 15 Jul 21, 00:50   in response to: JeffTucker in response to: JeffTucker
 
Attachment video.svg (4.8 KB)
I'm embarrassed to say that I have modified the new updates of Neptune every time to add a left and right-pointing hand, and to add my own version of video.svg, but when I saw that you now have left and right-pointing arrows I decided that I didn't need to make my mods, forgetting that I still needed to replace the video.svg with my version (attached). Chalk it up to yet another senior moment.

Thanks for the quick reply.
JeffTucker

Posts: 8,362
Registered: 31-Jan-2006
Re: Neptune 63: video overlay opacity
Posted: 15 Jul 21, 02:15   in response to: rfm2 in response to: rfm2
 
Confession is good for the soul, but if you continue to mess with my finely-crafted skins, there will be blood. ;)
JeffTucker

Posts: 8,362
Registered: 31-Jan-2006
Re: Neptune 63: video overlay opacity
Posted: 15 Jul 21, 07:32   in response to: JeffTucker in response to: JeffTucker
 
Attachment video.svg (5.1 KB)
Your video icon is a little on the ragged side. Try this one, instead.

ETA: And BTW, you don't have to specify both width and height for it - just width will do the trick. If the height isn't specified, it defaults to auto, which means the aspect ratio will be preserved.
rfm2

Posts: 68
Registered: 13-Dec-2007
Re: Neptune 63: video overlay opacity
Posted: 15 Jul 21, 17:46   in response to: JeffTucker in response to: JeffTucker
 
The thicker black ring around the overlay makes it much more noticeable when against a very light background image. Thanks for the new version and the tip about the width/height.
jimberry

Posts: 493
Registered: 30-Aug-2004
Re: Neptune 63: video overlay opacity
Posted: 15 Jul 21, 19:34   in response to: JeffTucker in response to: JeffTucker
 
Attachment video100.svg (479 bytes)
If either of those files are opened in a text editor, you will see that they really contain PNG coding.
The attached "video100.svg" contains true SVG coding and is much smaller (less than 1kb).


Edited by: jimberry on 16 Jul 2021, 11:35
(revised the SVG to display correctly in browser)
JeffTucker

Posts: 8,362
Registered: 31-Jan-2006
Re: Neptune 63: video overlay opacity
Posted: 15 Jul 21, 19:47   in response to: jimberry in response to: jimberry
 
That one seems to have the added advantage of being completely invisible. Open it in any browser. ;)

ETA: BTW, have you found a good freebies SVG editor? For my stuff, I've stuck to finding or modifying a PNG, and just feeding it to an online converter. Good enough - yeah, the files are a bit larger, but they're still tiny, and after the first page load, they're coming from cache anyway.
jimberry

Posts: 493
Registered: 30-Aug-2004
Re: Neptune 63: video overlay opacity
Posted: 15 Jul 21, 19:57   in response to: JeffTucker in response to: JeffTucker
 
Interesting :)
I only checked it in an image viewer. I'll have another look at it tomorrow (it's now almost 2 am here) but I am sure there is an answer.
JeffTucker

Posts: 8,362
Registered: 31-Jan-2006
Re: Neptune 63: video overlay opacity
Posted: 15 Jul 21, 20:04   in response to: jimberry in response to: jimberry
 
Attachment video100.svg (451 bytes)
Fixed, I think. A problem with the viewBox and transform attributes.

(Still curious about an editor.)
jimberry

Posts: 493
Registered: 30-Aug-2004
Re: Neptune 63: video overlay opacity
Posted: 15 Jul 21, 20:05   in response to: JeffTucker in response to: JeffTucker
 
My freebie SVG editor is just a text editor.
The two video.svg files are really only PNGs in disguise, they are bitmaps, not vector, and therefore not scalable, so you might as well just use the original PNG.
But as you say, the are small enough and as long as you don't need to enlarge them, no-one is going to notice ;)

ETA I might try Bluefish to see if it has any specific assistance re SVG coding.

Edited by: jimberry on 16 Jul 2021, 02:06
JeffTucker

Posts: 8,362
Registered: 31-Jan-2006
Re: Neptune 63: video overlay opacity
Posted: 15 Jul 21, 20:27   in response to: jimberry in response to: jimberry
 
Using SVG's lets me set their colors under program control. Can't really do that with PNG's.
jimberry

Posts: 493
Registered: 30-Aug-2004
Re: Neptune 63: video overlay opacity
Posted: 16 Jul 21, 02:45   in response to: JeffTucker in response to: JeffTucker
 
I have obviously misunderstood the need for scaling the dimensions. Your version seems to work for image viewers as well as browsers, whereas my use of scaling with reduced viewbox dimensions only works for image viewers. I guess I could have started with reduced dimensions in the drawing commands so that there would be no need for scaling and the viewbox parameters would match the width and height.

I haven't tried it yet, but Inkscape claims to be able to "trace" a bitmap (like PNG) producing vector paths, but the results could be problematic - "The paths that are created can have thousands of nodes ... ..."

Here is a link to the Inkscape manual chapter on tracing bitmaps -
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Trace.html
JeffTucker

Posts: 8,362
Registered: 31-Jan-2006
Re: Neptune 63: video overlay opacity
Posted: 16 Jul 21, 03:11   in response to: jimberry in response to: jimberry
 
Attachment weblocation200.png (20.4 KB)
Yes, the online converters often get carried away with what are, to human eyes, simple geometric shapes. When about 6-10 points would do the job, they sometime return hundreds of points.

I've started reworking some of the icon graphics for my skins. For the simplest stuff, it might actually be easier to start with simple SVG's, and let a converter generate the PNG's, when needed.

And there are some graphics that resist all efforts to produce true vectors. I've got a web location overlay, for example.... I've fed this one to various online converters, with often hilarious results. ;)
jimberry

Posts: 493
Registered: 30-Aug-2004
Re: Neptune 63: video overlay opacity
Posted: 16 Jul 21, 04:44   in response to: jimberry in response to: jimberry
 
I tried importing a "play.png" icon into Inkscape but couldn't get the "trace" option ("Path>Trace Bitmap" or "Shift+Alt+B") to work.
It seemed easier to use the "circle" and "polygon" tools to overlay SVG objects over the PNG bitmap and then delete the bitmap image, but even then it was too fiddly for me. For such a simple two-piece icon I found it a straightforward task to just write circle and polygon commands as XML text using a text editor.
Legend
Forum admins
Helpful Answer
Correct Answer

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