I've been using FreeImage lib for some years now, always with a bad feeling about the architecture and the scalability of its features.
I keep on using it as I didn't find another more convincing image loading library ; but today I had the proof that my feelings were right !
While loading a small 11x11 32bits TGA file, FreeImage reported it as being FIC_RGB and not FIC_RGBA, thus leading my wrapping code to remove the alpha channel... After a quick investigation, I found out that the 'FreeImage_GetColorType' function, when called, actually scans all pixels of RGBA images, and reports FIC_RGB if the alpha channel of every pixel is 255 !
Uh...
Showing posts with label image. Show all posts
Showing posts with label image. Show all posts
11/06/2007
11/05/2007
Adobe/boost GIL vs. image resampling
After my first experiments with GIL a few months ago, I'm quite convinced that I'll have to take a closer look at it.
My first experiments allowed me to cleanup somehow my image support libs, and the wrapping of FreeImage library.
Having now the objective of a total makeup of my texture generation/compression pipeline, I'd like to have a solid framework to back up my algorithms, that would allow me to be more "data-format agnostic".
I've got to refresh my C++ template metaprogramming tricks as I'll have to face horrendous error messages ; I'll make sure not to drink too much coffee and have some aspirin nearby !
I'll tackle first with some image resampling algorithms, I hoped to find someone kind enough to publish something... Apart the limited resample extension to GIL, I didn't have any luck so far...
I hope GIL will be worth the time I'm going to spend with it ! If anyone who happens to read this have some GIL user experience to share, I'd be glad to be enlightened !
My first experiments allowed me to cleanup somehow my image support libs, and the wrapping of FreeImage library.
Having now the objective of a total makeup of my texture generation/compression pipeline, I'd like to have a solid framework to back up my algorithms, that would allow me to be more "data-format agnostic".
I've got to refresh my C++ template metaprogramming tricks as I'll have to face horrendous error messages ; I'll make sure not to drink too much coffee and have some aspirin nearby !
I'll tackle first with some image resampling algorithms, I hoped to find someone kind enough to publish something... Apart the limited resample extension to GIL, I didn't have any luck so far...
I hope GIL will be worth the time I'm going to spend with it ! If anyone who happens to read this have some GIL user experience to share, I'd be glad to be enlightened !
Libellés :
image
10/28/2007
Texture atlas gaps filling
I've come to change my gaps filling default algorithm for my generated atlas textures (mainly light maps).
I was not satisfied of my previous algorithm that did some dumb iterative texel replication of the nearest non-empty texel. This process lead to visually satisfying results when using the resulting textures, but the iterative process was too long on big textures (above 4M texels).
I tried to implement something like pull-push method, which turns out to have a better performance.
I'm quite glad with the results, except for the first texels at the immediate border of the charts boundaries. As my rasterization process is not exactly perfect for texture generation (it was designed for screen rasterization, and the rounding rules does not match texture access rounding rules), those texel are unfortunately visible during rendering...
I suppose I will try to mix both worlds : have a few iterations of border "fattening" followed by the pull-push gap filling...
Eventually, when I have some time, I'll change my whole texture atlas rasterization process to improve accuracy ; I'll perhaps follow the leads open by Casey Muratori's work for Granny 3D.
I was not satisfied of my previous algorithm that did some dumb iterative texel replication of the nearest non-empty texel. This process lead to visually satisfying results when using the resulting textures, but the iterative process was too long on big textures (above 4M texels).
I tried to implement something like pull-push method, which turns out to have a better performance.
I'm quite glad with the results, except for the first texels at the immediate border of the charts boundaries. As my rasterization process is not exactly perfect for texture generation (it was designed for screen rasterization, and the rounding rules does not match texture access rounding rules), those texel are unfortunately visible during rendering...
I suppose I will try to mix both worlds : have a few iterations of border "fattening" followed by the pull-push gap filling...
Eventually, when I have some time, I'll change my whole texture atlas rasterization process to improve accuracy ; I'll perhaps follow the leads open by Casey Muratori's work for Granny 3D.
Libellés :
image
Subscribe to:
Posts (Atom)