Recent

Author Topic: Get Started / How'to with BGRABitmap Pack  (Read 2053 times)

Ernest

  • Newbie
  • Posts: 6
Get Started / How'to with BGRABitmap Pack
« on: November 15, 2023, 11:14:03 am »
    Starting Point
    The whole development of circular and lainz are impressive but there is in my opinion a huge lack of documentation/explanations of correct/ intended use of the BGRA units.
    With other words: there is a huge lack of showing the results of the great developoment these two guys did in last years!
    ... or am i wrong?

    Problem
    I am struggling to understand which class/ properties/ methods should i use to fullfill the specific task.
    I'll present you three examples:
    • example for TBGRACanvas2D
      Though there are many examples in BGRA package (from https://github.com/bgrabitmap) shows a lot of practical implementations (e.g. testcanvas2D for TBGRACanvas2D), there is no explanation of what are the meaning of such methods like restore or stroke...
      Is that explained somewhere in the tutorial: https://wiki.freepascal.org/BGRABitmap_tutorial ?
    • example for BGRABitmap tutorial
      The so called BGRABitmap tutorial is no more updated since 2016...  (https://forum.lazarus.freepascal.org/index.php/topic,12390.390.html)
    • example for TBGRAAffineBitmapTransform
      If I'm looking for "TBGRAAffineBitmapTransform" in search engine on the current forum http://forum.lazarus.freepascal.org I get only 4 results - that's a pity... and i want just to rotate sth...
      And in that post https://forum.lazarus.freepascal.org/index.php/topic,40551.0.html i'm reading from circular following:

      Quote
      Note that PutImageAffine ou PutImageAngle functions of TBGRABitmap may already give you what you need.
      Where can I find "How-To's" for proper using of many of the units being part of TBGRABitmap Pack? Are there some examples for application of these mentioned methods?

      Quote
      Also in general, it is better to avoid using the Canvas property of TBGRABitmap
      Where can I find out that using of the canvas property is not recommended? What should i use instead of that?

    Motivation
    So my objective to start a new topic is to get the answers from the community on how to get possibly fast to get started / familiar with BGRA Bitmap adn become an expert in that subject.

    Request to the community
    So feel free to comment and point out of more examples (like the page with demos  (https://github.com/bgrabitmap/demo) or practical / easily understandable tutorials/ how to's or other kind of instructions.

    Thank you :) [/list]

    -----
    Edit (05.01.2024) is related to the wrong counter ("three examples", not "two examples").
    « Last Edit: January 05, 2024, 03:10:30 pm by Ernest »

    lainz

    • Hero Member
    • *****
    • Posts: 4599
    • Web, Desktop & Android developer
      • https://lainz.github.io/
    Re: Get Started / How'to with BGRABitmap Pack
    « Reply #1 on: November 15, 2023, 05:02:23 pm »
    I'm mostly contributing with BGRAControls. But the library author is circular.

    There are a lot of demos that comes with bgrabitmap, check them.

    With BGRAControls as well.

    We're the demoscene =)

    circular

    • Hero Member
    • *****
    • Posts: 4356
      • Personal webpage
    Re: Get Started / How'to with BGRABitmap Pack
    « Reply #2 on: November 24, 2023, 12:27:16 pm »
    Hello Ernest,

    There is indeed room for improvement regarding the documentation. Any help is welcome. I invite you to get in touch with @Love:
    https://forum.lazarus.freepascal.org/index.php/topic,64524.msg490837.html#msg490837

    1. About Canvas2D, there is indeed a tutorial on it. It is supposed to be as close to the HMTL canvas functions. So you can find explanations in the Javascript documentation.
    https://wiki.freepascal.org/BGRABitmap_tutorial_14
    https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/restore

    Note that help would be welcome as well for comments inside the code.

    2. About BGRABitmap tutorial in general, there is room for improvement. The topic you mention was a good place to discuss that.

    3. With a search engine, you can find all occurrence of "BGRABitmap PutImageAngle" on the Internet.
    https://gilles-vasseur.developpez.com/tutoriels/transitions/bgra5/

    Alternatively, you can ask ChatGPT for an example. Here I've made a GPT for BGRABitmap: https://chat.openai.com/g/g-FO7aiutRx-bgrabitmap-assistant
    « Last Edit: November 24, 2023, 12:40:52 pm by circular »
    Conscience is the debugger of the mind

    user name

    • Guest
    Re: Get Started / How'to with BGRABitmap Pack
    « Reply #3 on: November 24, 2023, 02:20:21 pm »
    1. 
    3. 
    Alternatively, you can ask C******

    no you didn't
    first referring to j*avascript documentation then suggesting to ask C******
    then basically saying „g**gle it‟, and showing an article in Fr*nch

    this post is gold
    you should have kept just the first paragraph and second point but instead you made a funny joke

    lainz

    • Hero Member
    • *****
    • Posts: 4599
    • Web, Desktop & Android developer
      • https://lainz.github.io/
    Re: Get Started / How'to with BGRABitmap Pack
    « Reply #4 on: November 26, 2023, 11:36:55 am »
    Common @user name. Don't spread hate.

    We do our best with our free time.

    What's wrong with Javascript if bgrabitmap supports it the same that in Javascript?

    And what's wrong with French? The author of bgrabitmap is French. Translate is like right click then translate nowadays.

    user name

    • Guest
    Re: Get Started / How'to with BGRABitmap Pack
    « Reply #5 on: November 28, 2023, 02:07:15 pm »
    Common @user name. Don't spread hate.

    We do our best with our free time.

    What's wrong with Javascript if bgrabitmap supports it the same that in Javascript?

    And what's wrong with French? The author of bgrabitmap is French. Translate is like right click then translate nowadays.

    dude what spread hate what are you talking about dude what like on the contrary i love BGRABitmap its a great library and Lazpaint is a beautiful program i'm grateful to him and it needs better documentation indeed please help guys thanks
    theres nothing wrong with french haha i was just kidding
    saying stuff like « g**gle it » isn't cool and j*vascript and m*zilla are trash but suggesting to use c*****t is a serious offence

    circular

    • Hero Member
    • *****
    • Posts: 4356
      • Personal webpage
    Re: Get Started / How'to with BGRABitmap Pack
    « Reply #6 on: November 28, 2023, 05:08:32 pm »
    Hello @UserName,

    I am a bit confused reading your messages with the heavy use of the asterisks. It would make it easier to understand your intent. Also your username is quite confusing as well. It may be a kind of humour though on a forum, where we don't have additional sensory information.

    Your posts appear as sarcastic, which could be enjoyable in other circumstances, but not when we are making a first contact. Hence it can look conflictual. So even if it may be less fun, I invite you to lean towards a more conventional and respectful communication.

    The situation is the following: there are not many people that are available to help with documentation and Ernest proposes to help. My aim here is not to provide directly the documentation, but to give hints on how to fill in the gaps. Of course, if there are certain aspects that remain unclear, I can provide more information.

    If we look at our common purpose to make documentation, it is possible to address the language barriers by providing documentation in multiple languages, as it has been started on the wiki. People have helped there translating to other languages, and I am sure it will be of great help in the future.

    When building the documentation, as Lainz said, it is possible to translate from French to English nowadays with a pretty good result. There can be valuable resources in other languages and they can give swiftly a base text. Similarly HTML canvas documentation is also a valuable source to speed up the process.

    If your willing to, @UserName, you can also help with the documentation. It is a community project and every contribution provide its unique perspective.
    Conscience is the debugger of the mind

    Ernest

    • Newbie
    • Posts: 6
    Re: Get Started / How'to with BGRABitmap Pack
    « Reply #7 on: January 05, 2024, 03:06:44 pm »
    Hallo everyone,

    Thank you @lainz & @circular for the answers.
    Your references (especially similarities with Javascript & HTML) are helpful and indicate i can also extend my knowledge in these areas.
    You confirmed my assumptions / concerns with the statement "there is a room for improvement".

    To @UserName: please consider that your answer brings nothing => sometimes "silence is golden".   

    Post can be closed!

     

    TinyPortal © 2005-2018