f3d-app / f3d

Fast and minimalist 3D viewer.
https://f3d.app
BSD 3-Clause "New" or "Revised" License
2.88k stars 207 forks source link

image::save and image::saveToBuffer should check type is compatible with format #1559

Closed mwestphal closed 2 months ago

mwestphal commented 3 months ago

Describe the bug image::save and image::saveToBuffer should check type is compatible with format

To Reproduce Steps to reproduce the behavior:

  1. Open the file using f3d --dry-run example.glb
    f3d::image hdrImg("palermo_park_1k.hdr");
    hdrImg.save("path/to/disk.png");
  2. no error but it should fail instead

Expected behavior

Exception thrown

Meakk commented 2 months ago

Isn't it fixed now @mwestphal ?

mwestphal commented 2 months ago

it is, fixed by https://github.com/f3d-app/f3d/pull/1565