Image2::scale and Image2::resize
-
- OGRE Contributor
- Posts: 267
- Joined: Wed Apr 23, 2014 3:49 pm
- Location: Bologna, Italy
- x 75
Image2::scale and Image2::resize
Why Image2::scale and Image2::resize methods are stripped out by an #ifdef 0? Do they not work?
I'm asking because, since we're working on sort of mini editor, it would be very useful to have those functions in play.
I'm asking because, since we're working on sort of mini editor, it would be very useful to have those functions in play.
Senior programmer at 505 Games; former senior engine programmer at Sandbox Games
Worked on: Racecraft Esport — Racecraft Coin-Op, Victory: The Age of Racing
-
- OGRE Team Member
- Posts: 5505
- Joined: Sat Jul 21, 2007 4:55 pm
- Location: Buenos Aires, Argentina
- x 1372
Re: Image2::scale and Image2::resize
Image::scale needs porting, as it relies on PixelUtil instead of PixelFormatGpu
Additionaly, the scaling routines need to be checked to see if they properly support the case when bytesPerRow != bytesPerPixel * width
We assume a rowAlignment of 4 (the start of each row is aligned to 4 bytes) and that's why bytesPerRow may not match. Old Image did not have that restriction.
Pixel formats with a size of 4 or 8 bytes are naturally aligned, but that's not true for 8/16/48 bit images.
Note however, this is not a complex task. Anybody should be able to port it with relative ease. (I'm not interested and I'm focused on other stuff)
Additionaly, the scaling routines need to be checked to see if they properly support the case when bytesPerRow != bytesPerPixel * width
We assume a rowAlignment of 4 (the start of each row is aligned to 4 bytes) and that's why bytesPerRow may not match. Old Image did not have that restriction.
Pixel formats with a size of 4 or 8 bytes are naturally aligned, but that's not true for 8/16/48 bit images.
Note however, this is not a complex task. Anybody should be able to port it with relative ease. (I'm not interested and I'm focused on other stuff)
-
- OGRE Team Member
- Posts: 185
- Joined: Mon Mar 24, 2008 4:54 pm
- Location: Kraków, Poland
- x 41
Re: Image2::scale and Image2::resize
Our code use this feature, so it is in my short list
-
- OGRE Contributor
- Posts: 267
- Joined: Wed Apr 23, 2014 3:49 pm
- Location: Bologna, Italy
- x 75
Re: Image2::scale and Image2::resize
Cool! Can you put this feature even in v2-2-irradiance-field branch (since I've noticed that you mostly work on master branch)?
Senior programmer at 505 Games; former senior engine programmer at Sandbox Games
Worked on: Racecraft Esport — Racecraft Coin-Op, Victory: The Age of Racing
-
- OGRE Team Member
- Posts: 5505
- Joined: Sat Jul 21, 2007 4:55 pm
- Location: Buenos Aires, Argentina
- x 1372
Re: Image2::scale and Image2::resize
I'll be merging it once he puts it on the master branch.