Re: SDL_SetWindowIcon producing messed up icon

Sam Lantinga <[email protected]> Tue, 10 Jan 2017 07:21:03 -0800
Newsgroups gmane.comp.lib.sdl
Message-ID <CACC3sbHJuRjtUM21UG=HomUR2nCjwc24yZWDtSFh-LGBQ=2h5Q@mail.gmail.com>
Does it happen if you load the icon from the BMP that you saved?

Can you please report this on bugzilla.libsdl.org, and attach whatever we
need to be able to reproduce the problem? Also, please include what
operating system and version you're running.

Thanks!

On Mon, Jan 9, 2017 at 2:56 PM, dandago <[email protected]> wrote:

> Hi,
>
> I've come across a weird issue with SDL_SetWindowIcon(). I am creating a
> surface from pixel data that I already have available, using SDL_
> CreateRGBSurfaceWithFormatFrom(). I know that the pixel data is correct
> because I'm rendering it in my game, and I know the surface I'm creating
> from it for the icon is valid because I tried saving it to a BMP and the
> image was created perfectly.
>
> But when I pass the same surface to SDL_SetWindowIcon(), I get a garbled
> mess.
>
> I can upload some images showing what it looks like if there's some way to
> do that in this forum.
>
> Has anyone had a similar issue before?
>
>
> ------------------------------
>
> Daniel D'Agostino
> http://gigi.nullneuron.net/gigilabs/
>
> _______________________________________________
> SDL mailing list
> [email protected]
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
>

_______________________________________________
SDL mailing list
[email protected]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org