Jump to content

Recommended Posts

Posted

Hi

 

I can't figure out how to use a UniNativeImageList  as the picture source for a UniImage.

I've tried all the obvious ( to me at least ) assignments without luck  even resorting to this horror ! >>  

 

uniimage2.LoadFromStream(Tstream(uninativeimagelist1.Images[0].MemoryImage));

 

I'm sure it must be simple to do.

 

Anyone care to enlighten me ?

 

Many thanks

 

Posted

Hi

 

I can't figure out how to use a UniNativeImageList  as the picture source for a UniImage.

I've tried all the obvious ( to me at least ) assignments without luck  even resorting to this horror ! >>  

 

uniimage2.LoadFromStream(Tstream(uninativeimagelist1.Images[0].MemoryImage));

 

I'm sure it must be simple to do.

 

Anyone care to enlighten me ?

 

Many thanks

 

Hi,

 

You can try as follow

UniNativeImageList.GetBitmap(0, UniImage2.Picture.Bitmap);

 

Best Regards,

  • Administrators
Posted
var
  P : TPngImage;
begin
  P := TPngImage.Create;
  try
    UniNativeImageList1.GetPng(0, P);
    UniImage1.Picture.Graphic.Assign(P);
  finally
    P.Free;
  end;

Note: Requires build1295

Posted

I've tried just about every combination I can think of up and down the object hierarchy but can't find a solution.

I think I will pre-load the PNGs into a directory and simply use a loadfromfile in each case.

 

would it be possible to add a property/method to the UniNativeImageList that returned a Tpicture or have a UnImage descendant that had imagelist & image index properties ?

 

Many thanks

 

Harry

Posted

Thats working fine now, as per your example with 1295.

 

Reported - fixed - built - Uploaded - Downloaded - built -  tested  < Two and Half Hours>.

 

That's a pretty amazing service.

 

Thank you

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...