B4A Question [B4X] Huge filesizes with AnimatedGifEncoder - Blueforcer    Aug 13, 2023 As BitmapCreator bc.Initialize(8,8) For y = 0 To 8 - 1 For x = 0 To 8 - 1 Dim i As Float = y * 8 + x Dim a As ARGBColor bc.SetARGB(x,y,bc.ColorToARGB(frame.Get(i),a)) Next Next BitmapList.Add(bc.Bitmap) Next...?) Unfortually both outputs "very big" files Since i need to upload them to a microcontroller im... a compression is missing. Is it possible to add this in any kind to one of the libraries? this is how i build... B4A Question Get XUI RGB - DonManfred (first post)    Mar 11, 2019 https://www.b4x.com/android/forum/pages/results/?query=ColorToARGB ?... B4J Question Remove background png - JordiCP (first post)    Dec 21, 2021   (6 reactions) As BitmapCreator = CreateBC(bmp) Dim oldargb, newargb, a As ARGBColor bc.ColorToARGB(OldColor, oldargb) bc.ColorToARGB(NewColor, newargb) For x = 0 To bc.mWidth - 1 For y = 0 To... As BitmapCreator = efecto.CreateBC(bmp) Dim oldargb, newargb, a As ARGBColor bc.ColorToARGB(OldColor, oldargb) bc.ColorToARGB(NewColor, newargb) For x = 0 To bc.mWidth - 1 For y = 0 To bc.mHeight - 1 bc.GetARGB(x, y, a) If a.a = oldargb.a And a.r... B4A Code Snippet [B4X] [BitmapCreator] Draw radial gradients - Erel    May 10, 2018   (8 reactions)   tags: circle fill gradient ) As ARGBColor For i = 0 To GradColors.Length - 1 bc.ColorToARGB(GradColors(i), RGBColor...)) bc.SetARGB(x, y, DistanceToColor(distance)) Next Next End Sub Usage example: Dim bc...))) Dim DistanceToColor(MaxDistance) As ARGBColor Dim CurrentColorIndex As Int Dim LengthOfEachColor As Int = Ceil(MaxDistance / (GradColors.Length - 1)) Dim c As Int For i = 0 To MaxDistance - 1 Dim l As Float = CurrentColorIndex / LengthOfEachColor DistanceToColor... B4A Question WriteToStream quality - Blueforcer (first post)    Aug 17, 2023 ? Dim bc As BitmapCreator bc.Initialize(8,8) For y = 0 To 7 For x = 0 To 7 Dim i As int = y * 8 + x Dim a As ARGBColor bc.SetARGB(x,y,bc.ColorToARGB(frame.Get(i),a)) Next Next Dim b As B4XBitmap = bc.Bitmap b.WriteToStream(File.OpenOutput(xui.DefaultFolder, "test...I need to build something. because currently its part of a huge project, the bitmap is generated by a pixeldrawer 144868 I also see, that the filesize of android output is 299 bytes, while iOS... Wish XUI GetARGB function. - William Lancee (first post)    Jul 9, 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 really need any bits Dim argb As ARGBColor bc.ColorToARGB(xui.Color_ARGB(150, 75, 230, 255), argb) Log(argb.a & TAB & argb.r & TAB & argb.g & TAB & argb.b) ... Wish XUI drawline/rectangle straight line as non antialised - Erel (first post)    Aug 3, 2019 .mHeight Then Return
Dim argb As ARGBColor
bc.ColorToARGB(clr, argb)
For x = Max(0, Min(x1, x2)) To Min(Max(x1, x2), bc.mWidth - 1)
bc.SetARGB(x, y, argb)
Next
End Sub
Sub....mWidth Then Return
Dim argb As ARGBColor
bc.ColorToARGB(clr, argb)
For y = Max(0, Min(y1, y2)) To Min(Max(y1, y2), bc.mHeight - 1)
bc.SetARGB(x, y, argb)
Next
End Sub
... Games [XUI2D] Example Pack - Erel (first post)    Sep 12, 2018   (9 reactions) I've updated the monster truck example. The smoke is now made of many small bodies: 289482324 1. The bodies gravity scale is set to -0.8. This causes the bodies to accelerate upwards. 2. The graphics are created from a single image. See CreateSmokeParticles. Note that only the value of the R channel is used. You can change the target color on this line: src.ColorToARGB(0xFF484848, NewClr) 3. The smoke bodies are only created if the FPS >= 57.... B4A Question Can I find the only empty distance in the picture - Erel (first post)    Feb 24, 2022   (4 reactions)
Dim GapStart As Int
Dim white As ARGBColor
white = bc.ColorToARGB(xui.Color_White, white)
Dim argb As ARGBColor
Dim InsideAGap As Boolean
For x = 0 To bc.mWidth - 1 Step 2 'step is an optimization factor
bc.GetARGB(x, y, argb)
If argb.r = white.r And argb.b = white.b And argb.g = white.g Then
If InsideAGap = False Then
GapStart... Games [X2][solved] How to use transparent color? - Erel (first post)    Jul 31, 2019 As PremultipliedColor
Dim argb As ARGBColor
TilesBC.ColorToARGB(clr, argb)
TilesBC.ARGBToPremultipliedColor(argb, ptranspm)
For y = 0 To TilesBC.mHeight - 1
For x = 0 To TilesBC.mWidth - 1... the scale to 1.
Call removePseudoTransparentColor.
Get the bitmap with BC.Bitmap.... Page: 1   2   3   4   5   6   7   |