User Tag List

Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 23

Thread: Default Image?!?

  1. #1
    No Products Registered

    Join Date
    Jul 2006
    Location
    Umeň, Sweden
    Posts
    1,090
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Image?!?

    I'm toying around with a new little extension project which saves images to the image bank...

    How do I set default images when the extension is placed on the frame?

    The only solution I could come up with is to open the image editor when it's placed, and I don't really like that...

    Thanks!

  2. #2
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Sep 2006
    Location
    Norway
    Posts
    445
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Default Image?!?

    Well you could draw or load an image from res when you place the extension on the frame (PutObject) and make the image editor use it as the default image. Or something in that direction
    Jean Villy Edberg

  3. #3
    No Products Registered

    Join Date
    Jul 2006
    Location
    Umeň, Sweden
    Posts
    1,090
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Default Image?!?

    Yes.. That's what I'd like.. to be able to load an image from the resources into the image bank.. Any idea on what the code for this would be?

    I'm new to graphical extensions....

  4. #4
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Sep 2006
    Location
    Norway
    Posts
    445
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Default Image?!?

    Well so am I hehe

    But I think you could use LoadImage on an csurface since it supports loading an image from resources (Look it up in the help file for more info)
    Jean Villy Edberg

  5. #5
    No Products Registered

    Join Date
    Jul 2006
    Location
    Umeň, Sweden
    Posts
    1,090
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Default Image?!?

    Thanks!

  6. #6
    No Products Registered

    Join Date
    Jul 2006
    Location
    Umeň, Sweden
    Posts
    1,090
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Default Image?!?

    This seems to be the function

    LoadImage ( HINSTANCE hInst, int bmpID, LIFlags loadFlags = LI_NONE );

    However, all I get is a blank image =\


    In my resource file I have this

    EXO_MYIMG BITMAP MOVEABLE PURE "Img.bmp"


    Then I have this defined

    #define EXO_MYIMG 402



    Then I call the function like this...

    cSurface imageSurface;
    LockImageSurface (mV->mvIdAppli, edPtr->wImgIdx[0], imageSurface, LOCKIMAGE_READBLITONLY);

    imageSurface.LoadImage ( mV->mvHInst , EXO_MYIMG, LI_CHANGESURFACEDEPTH );

    UnlockImageSurface (imageSurface);


    What am I doing wrong?


    EDIT: Just noticed that I have READBLITONLY... Testing...
    EDIT2: Nope changed nothing =\

  7. #7
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module
    Sphax's Avatar
    Join Date
    Jun 2006
    Location
    Paris, France
    Posts
    4,454
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Default Image?!?

    Try using this:
    Code:
    imageSurface.LoadImage ( mV->mvHInst , EXO_MYIMG, LI_REMAP);// Load our bitmap from the resource

  8. #8
    No Products Registered

    Join Date
    Jul 2006
    Location
    Umeň, Sweden
    Posts
    1,090
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Default Image?!?

    Thanks!
    Tried it, didn't work! =\

  9. #9
    No Products Registered

    Join Date
    Jul 2006
    Location
    Umeň, Sweden
    Posts
    1,090
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Default Image?!?

    Just on a sidenote... can this function be called from the create object function in Edittime.cpp ?

  10. #10
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module
    Sphax's Avatar
    Join Date
    Jun 2006
    Location
    Paris, France
    Posts
    4,454
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Default Image?!?

    It works for me but I've not tried it in the create object... You should try it in the displayrunobject (the first time it is called).

Page 1 of 3 1 2 3 LastLast

Similar Threads

  1. Image annotation / Image modification with MMF2
    By titobal in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 13th September 2013, 04:13 PM
  2. image active : Bug Changement d'image
    By Monos in forum Android Export Module Version 2.0
    Replies: 2
    Last Post: 10th April 2013, 05:55 PM
  3. Objet Image (ou Image Active) et rayures
    By volgot in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 20th April 2011, 04:10 PM
  4. Getting image dimensions from IMAGE parameters?
    By Nobuyuki in forum Shader Development
    Replies: 3
    Last Post: 6th February 2011, 11:51 PM
  5. alterable value z default value
    By zexy in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 12th September 2006, 05:48 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •