Giter Club home page Giter Club logo

Comments (6)

Reputeless avatar Reputeless commented on August 16, 2024 1
  1. では対応しましょう。テスト用に各フォーマットの bmp ファイルを用意してください(コミットには含まず)。
  2. std::bad_alloc を使うようにして大丈夫です。

from opensiv3d.

Raclamusi avatar Raclamusi commented on August 16, 2024 1

ヘッダと画像データの間にギャップがあるとき、および、パレットの色数が最大でないときに正しく読み込めないバグがありました。
一緒に直します。

スクリーンショット

from opensiv3d.

Raclamusi avatar Raclamusi commented on August 16, 2024 1

テスト用コード、実装完了しました。

ソースコード

from opensiv3d.

Raclamusi avatar Raclamusi commented on August 16, 2024 1

PR #1207 のコメントに変更についての詳しい説明を書きました。

from opensiv3d.

Raclamusi avatar Raclamusi commented on August 16, 2024
  1. 16-bit BMP は Microsoft Paint で保存できる形式ではなく、マイナーですが、1, 4, 8, 24, 32-bit に対応して 16-bit だけ対応しないのも変なので、16-bit にも一緒に実装していいですか?
  2. 現在の実装では、バッファの確保 ( std::malloc ) に失敗すると透明な画像を返す実装になっているので、std::bad_alloc もしくは std::length_error を投げるように変更したいです。一緒に実装しようと思っていますが、別で issue 立てたほうがいいですか?

if (uint8* const buffer = static_cast<uint8*>(std::malloc(rowSize * 4)))

from opensiv3d.

Raclamusi avatar Raclamusi commented on August 16, 2024

テスト用ソースコード: https://gist.github.com/Raclamusi/039af3aa2698424a3bfc48e885224f94
テスト用画像ファイル: https://drive.google.com/drive/folders/1UFL-rqHZ3wjn-5efr_9ghWNtZ-GqYlOD?usp=sharing

from opensiv3d.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.