B4J Question Remove background png - JordiCP (first post)    Dec 21, 2021   (6 reactions) 'KeepAlphaLevel - If true then the alpha level of the source color is kept. Public Sub ReplaceColor (bmp As B4XBitmap, OldColor As Int, NewColor As Int, KeepAlphaLevel As Boolean) As B4XBitmap Dim bc As BitmapCreator = CreateBC(bmp) Dim oldargb, newargb, a As ARGBColor bc.ColorToARGB(Old B4i Question MLKit Selfie Segmentation - Erel (first post)    Oct 01, 2024   (2 reactions) Mask As B4XBitmap) As B4XBitmap Dim SelfieBC As BitmapCreator = CreateBC(Selfie) Dim MaskBC As BitmapCreator = CreateBC(Mask) Dim oldargb, newargb, a As ARGBColor SelfieBC.ColorToARGB(xui.Color_Black, oldargb) SelfieBC.ColorToARGB(xui.Color_Transparent, newargb) For x = 0 To Wish XUI GetARGB function. - William Lancee (first post)    Jul 10, 2021   (6 reactions) That would be nice. I know that your wish is for it to be a built-in XUI method, and I know you know how to do this. But for those who are unfamiliar with this...
Dim bc As BitmapCreator 'Include this standard core library
bc.Initialize(0, 0) 'Zeroes because we don't rea Wish XUI drawline/rectangle straight line as non antialised - klaus (first post)    Aug 03, 2019 For my need I went back to the roots and have already written my own routine to draw thin lines without antialiasing.
In the routines in post#29, what is the reason for using:
Dim argb As ARGBColor
bc.ColorToARGB(clr, argb)
For x = Max(0, Min(x1, x2)) To Min(Max(x1, x2), bc.mWidth - 1)
bc.SetAR B4A Question Reverse colours and do mirror image of FontAwesome or Material icons - RB Smissaert (first post)    Sep 18, 2024 OldColor As Int, NewColor As Int, KeepAlphaLevel As Boolean) As B4XBitmap
Dim x As Int
Dim y As Int
Dim BMC As BitmapCreator = CreateBC(bmp2)
Dim oldargb As ARGBColor
Dim newargb As ARGBColor
Dim a As ARGBColor
BMC.ColorToARGB(OldColor, oldargb)
BMC.ColorToA B4A Library [B4X]ColourThief (Cross platform colour palette generating algorithm) - John Naylor    Mar 16, 2022   (19 reactions) Public Sub getDominantColor2(sourceImage As BitmapCreator, quality As Int, ignoreWhite As Boolean) As ARGBColor 'Returns a map of ARGBColor values, set how many with colorCount 'Ordered by most dominant to least dominant 'colorCount should be 2 - 255 Public Sub getPalette(sourceImage As B4XBitmap B4A Question Can I find the only empty distance in the picture - Erel (first post)    Feb 24, 2022   (4 reactions) 126027 This will help you get started: Private Sub FindLargestGapAtTheCenter (bc As BitmapCreator) As B4XRect Dim y As Int = bc.mHeight / 2 Dim MaxGapStart As Int Dim MaxGapEnd As Int Dim GapStart As Int Dim white As ARGBColor white = bc.ColorToARGB(xui.Color_White, white) B4J Question [Solved] Wand tool - jroriz (first post)    Sep 28, 2018   (3 reactions) It was perfect, using the first suggestion (from Roycefer). I did not test the others, but I greatly appreciate it!
The result was better than I expected.
The code I got is below. If anyone can improve it, I'm grateful.
Thank you all. This forum is simply fantastic!
Final code:
Sub Clean(Whichcolo B4J Question Rgba to hex using xui.Color_ARGB has weird behaviour - William Lancee (first post)    Dec 04, 2023 Based on your prefix #, you want the Web hex representation, which has the alpha level lowest to the right.
but the xui.Color_ARGB(a,r,g,b) function puts the alpha to the left most position.
So no mystery, you just switched the integer values to do what you need. The ColorToHex function, blind to w Games [X2][solved] How to use transparent color? - fredo (first post)    Aug 01, 2019   (2 reactions) b4x.com/android/forum/threads/x2-how-to-use-transparent-color.108173/#post-676534
Dim clr As Int = 0xff000000 + Bit.ParseInt(clrstring.SubString(1), 16)
Dim ptranspm As PremultipliedColor
Dim trans As PremultipliedColor
Dim pm As PremultipliedColor
Dim argb As ARGBColor
Tiles Page: 1   2   3   4   5   6   7   Powered by ColBERT |