Easiest way to display images

Murilo murilomiranda92 at hotmail.com
Wed Feb 6 00:59:52 UTC 2019


On Tuesday, 5 February 2019 at 21:25:54 UTC, Adam D. Ruppe wrote:
> On Tuesday, 5 February 2019 at 21:11:52 UTC, Murilo wrote:
>> What would be the easiest way to simply display a jpg or png 
>> image on the screen for a few seconds in Windows?
>
> That's a little more complex than playing a sound, there's no 
> one function to do it. You can in... oh about 50 lines, but I 
> can't write them off the top of my head.
>
> However, I do have a library that can do it in 5 lines.
>
> ---
> import arsd.simpledisplay;
> import arsd.image;
>
> void main() {
> 	displayImage(Image.fromMemoryImage(loadImageFromFile("filename 
> here")));
> }
> 


Thank you so but so much. I tested it here and it works.


More information about the Digitalmars-d-learn mailing list