- This topic has 24 replies, 3 voices, and was last updated 4 years, 8 months ago by
HeDiBo.
-
AuthorPosts
-
April 12, 2020 at 8:16 pm #68680
Support
KeymasterSorry, such feature is not implemented in the package.
Where you planning to use these images? which component?April 13, 2020 at 2:21 am #68681Stephane Senecal
ParticipantNot the easiest way, but you could trace your PNGs into SVGs using, for example, Inkscape and then convert those into font glyphs with an online tool for example.
Stephane Senecal
CIS Group
Delphi programmer since 2001April 13, 2020 at 12:31 pm #68683HeDiBo
ParticipantSorry, such feature is not implemented in the package.
Where you planning to use these images? which component?The easiest would be if the TsImage would have a flag, saying “Act like a font” for black and white images. Not every icon is a character (see attachments), that’s why I ask this.
PS. Apparently it is not possible to remove erroneous attachments in edit.
-
This reply was modified 5 years, 2 months ago by
HeDiBo.
-
This reply was modified 5 years, 2 months ago by
HeDiBo.
Attachments:
You must be logged in to view attached files.April 13, 2020 at 6:11 pm #68690Stephane Senecal
ParticipantTo AlphaSkins: Could it be possible to use a png as a mask and colorize it with any color?
Stephane Senecal
CIS Group
Delphi programmer since 2001April 14, 2020 at 12:21 am #68694HeDiBo
ParticipantMy idea was that most of that work was already done in TsCharImageList. So, it would not be much work to replicate for a black and white picture.
May 12, 2020 at 4:18 pm #68793HeDiBo
ParticipantAny comments, Serge?
May 14, 2020 at 4:39 pm #68808Support
KeymasterWhere you are planning to use these images? which component? TsImage? Or buttons? Or menus?
May 14, 2020 at 7:03 pm #68817HeDiBo
ParticipantWhere you are planning to use these images? which component? TsImage? Or buttons? Or menus?
Anywhere where a TsCharImageList can be used as an image source. It probably would need a slightly modified version of the TsCharImageList where two-color images can be stored.
May 21, 2020 at 7:46 pm #68834Support
KeymasterThe TsCharImageList component allow to define any custom colors for stored characters.
The problem is that your glyph is not character and may be stored in the TsAlphaImageList or in other imagelists.
But they can’t change a color of the custom image. Also, it’s not vector graphic and you should store big sized glyphs for further scaling.. Maybe will be better to make own font with these glyphs saved as characters?May 22, 2020 at 12:11 pm #68844HeDiBo
ParticipantI didn’t realize the big difference between characters, being vectors, and my icons, being bitmaps.
Still it is an interesting idea to have bitmaps that become negative on dark skins.June 23, 2020 at 11:10 am #69012HeDiBo
ParticipantAny thoughts about this, Serge?
September 8, 2020 at 11:40 am #69461HeDiBo
ParticipantCouldn’t you add a flag to a TsImage saying it should follow the skin. This would only work then on Black&White pictures.
September 9, 2020 at 3:20 pm #69495Support
KeymasterPlz, specify, this property must fill all non-transparent pixels in the image by color from skin?
How such property may be named?September 9, 2020 at 3:43 pm #69498HeDiBo
ParticipantNo. Just do what you do for characters. They are black on light skins, but white on darker skins.
For TsImage do similar: an image can be transparent or not. If the image is transparent, the B&W logic only applies to the visible part. If the image is not transparent, the whole image goes negative for dark skins.
If the image is a png image apply the B&W logic on the non-transparent part only. In that way, pixels that are partly visible because of anti-aliasing will also be made negative on darker skins.
The property can be named HonorSkinTone.September 9, 2020 at 5:01 pm #69508Support
Keymaster// If the image is not transparent, the whole image goes negative for dark skins.
Just white rectangle will be shown in darks skins in this case =)
September 9, 2020 at 6:59 pm #69521HeDiBo
ParticipantThat’s not a negative image.
September 16, 2020 at 4:13 am #69541Support
KeymasterHi
Do you mean just inverted image if skin is dark?September 16, 2020 at 9:05 am #69552HeDiBo
ParticipantIf skin is dark, make the white parts black, make the black parts white and leave the transoarent parts untouched.
In Dutch that’s called a negative image, but the better term in English is inverted 😁September 16, 2020 at 1:30 pm #69561Stephane Senecal
ParticipantI don’t think inverting the colors of an image is a good idea. It could have adverse effects on color images.
HeDiBo, I thought you only wanted to use an image as a mask.
Stephane Senecal
CIS Group
Delphi programmer since 2001September 16, 2020 at 3:24 pm #69562HeDiBo
ParticipantI don’t think inverting the colors of an image is a good idea. It could have adverse effects on color images.
I only want to use it for small 2 color black and white images.
-
This reply was modified 5 years, 2 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.