Discussion in 'Code Samples & Tips' started by bdiscount, Sep 25, 2007.

  1. bdiscount

    bdiscount Active Member Licensed User

    This is a program using imglib, imglibex, and a txt file.
    it saves image and loads img the only thing I have yet to learn is how to save a specific section of the screen. any help would be appreciated..The dlls are not in the zip.

    Attached Files:

  2. specci48

    specci48 Well-Known Member Licensed User

    Hi bdiscount,

    nice application but I'll receive an error choosing the menu option "back color" since the messagebox (line number 120) isn't implemented correctly.

    And a small hint to "delete" the external text file by using the AddEvent command. Add the For/Next loop to you App_Start and additionally add the sub bcClick:
    Sub App_Start
    For i = 1 To 48 
    "bc" & i, Click, "bcClick")
    End Sub

    Sub bcClick
        fc0 = 
    End Sub
    Now the Draw10.txt is not needed any more!


    Since Erel seems to have read this post (suprprise, surprise...), he added a subject "runtime controls manipulation" in the tutorial forum http://www.basic4ppc.com/forum/showthread.php?t=907. Just have a look at it for further explanation...
    Last edited: Sep 26, 2007
  3. colin9876

    colin9876 Active Member Licensed User

    1) Can anyone post the dlls I need to make this program work, as Im downloading this over the air to my device (not got pc here). Got it to load, and looked at the forms on it but it doesnt run yet???

    2) Just curious- on the form two invisible boxes at the bottom ax ay - what r these for? I saw the same thing on another program?

    3) Im not sure if this program does what Im also trying to do but
    I want to draw a pic to an image box then save it as a file
    (almost like having a bit map editor)
    I tried image1.line & image1.circle but although it didnt error nothing happened

    So can you draw to an image box and then save it as a file?

  4. bdiscount

    bdiscount Active Member Licensed User

    As it says imagelibex.dll and imagelib.dll are used.
    the ax and ay are array lists, used in drawing.
    It will save the form as a bmp.
    I have not been able to save a portin of the form to make it more usefull.
    If you come up with away to save a portion let me know.
    You should have got the dlls from here and or with B4ppc
  5. colin9876

    colin9876 Active Member Licensed User

    Format of bitmap files

    Without using a library I want to write a routine to scan a pic and save it as a bitmap

    Just out of ineterst does anyone know in a bitmap how many bytes is used for each pixel.

    Now at first I thought 3,one each for R G B because they have 256 variants each.

    But now I realise that PPC only shows 32 shades of each RGB, if u draw at say 9,9,9 it will round it to 8,8,8
    So 32 options is 5 bits, so 15 bits in all (leaves 1bit redundant if 2 bytes are used)

    1) I assume bitmaps are not compressed (unlike jpgs)
    2) What order are the pixels stored in the file (e.g.a row at a time starting from top to bottom)
    3) Is there any header info in a bitmap file
  6. RandomCoder

    RandomCoder Well-Known Member Licensed User

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice