Recent

Author Topic: Is there a TSVGImageList-type implementation?  (Read 1413 times)

dsiders

  • Hero Member
  • *****
  • Posts: 1077
Is there a TSVGImageList-type implementation?
« on: February 13, 2020, 07:27:36 pm »
After poking about a bit, I still haven't found what I'm looking for (with apologies to U2).

It seems that all the TImageList gyrations could be avoided if source data for images were in SVG format. Getting a particular resolution would be a matter of rendering the SVG data with the correct ViewBox dimensions.

I looked at BGRA, but did not see an ImageList equivalent.

Is anyone aware of such a beast, or have I found my next personal project that I really don't have time for? ;)
Preview Lazarus 3.99 documentation at: https://dsiders.gitlab.io/lazdocsnext

winni

  • Hero Member
  • *****
  • Posts: 3197
Re: Is there a TSVGImageList-type implementation?
« Reply #1 on: February 13, 2020, 09:23:00 pm »
Hi!

The BGRA Controls include a BGRA ImageList but - sorry - it contains a long list of image formats, but no vector format.

Yes, that has to be written on someones ToDo list!

Winni

circular

  • Hero Member
  • *****
  • Posts: 4217
    • Personal webpage
Re: Is there a TSVGImageList-type implementation?
« Reply #2 on: February 15, 2020, 01:30:00 am »
Hmm in fact that may not be too much work as SVG is supported by BGRABitmap so making an image list based on that is doable.

In fact, I am thinking that LZP format could be used as well.

So that would be a TBGRAVectorialImageList or something.
Conscience is the debugger of the mind

winni

  • Hero Member
  • *****
  • Posts: 3197
Re: Is there a TSVGImageList-type implementation?
« Reply #3 on: February 15, 2020, 01:52:45 am »
Hi!

That would be cool!

And all the trouble which is now around with the multi-resolution ImageList would vanish.

@circular: I did not think about you when I talked about the ToDo list. @dsiders talked about his ToDo list !!


Winni

dsiders

  • Hero Member
  • *****
  • Posts: 1077
Re: Is there a TSVGImageList-type implementation?
« Reply #4 on: February 15, 2020, 01:53:59 am »
Hmm in fact that may not be too much work...

Those are famous last words.... :)

...as SVG is supported by BGRABitmap so making an image list based on that is doable.
In fact, I am thinking that LZP format could be used as well.
So that would be a TBGRAVectorialImageList or something.

I was aware of the SVG support, that's why I looked at BGRA first. .SVGZ seems to use gzip/deflate. I'm not aware of LZP, I'll have to look it up.

I'd just call it TBGRASvgImageList unless its native format is something other than SVG.
Preview Lazarus 3.99 documentation at: https://dsiders.gitlab.io/lazdocsnext

circular

  • Hero Member
  • *****
  • Posts: 4217
    • Personal webpage
Re: Is there a TSVGImageList-type implementation?
« Reply #5 on: February 15, 2020, 03:55:08 am »
Hmm in fact that may not be too much work...

Those are famous last words.... :)
Haha indeed.

Quote
I was aware of the SVG support, that's why I looked at BGRA first. .SVGZ seems to use gzip/deflate. I'm not aware of LZP, I'll have to look it up.

I'd just call it TBGRASvgImageList unless its native format is something other than SVG.
LZP is LazPaint format. It supports now vectorial and I've started to use that in LazPaint for toolbars. For now I am populating a regular image list with the rendered images from LZP files.

Having an vectorial image list that can take SVG, LZP and raster images would be ideal. So that it would be possible to replace progressively raster images and use features of LZP as well as SVG.  :)

If you store each image source in a stream, you can detect its format and handle it accordingly.

I would love such component.  :-*
Conscience is the debugger of the mind

 

TinyPortal © 2005-2018