What do you mean? there is absolutely no mention of alpha channels in BMP structure...
What do you mean? there is absolutely no mention of alpha channels in BMP structure...
This is my game project - Top Down City:
http://www.pascalgamedevelopment.com...y-Topic-Reboot
My OpenAL audio wrapper with Intelligent Source Manager to use unlimited:
http://www.pascalgamedevelopment.com...source+manager
There are actually five versions of BMP for Windows and two or more for OS2. Alpha channel is supported since V4 (introduced with Windows 95) but it is still not very common. Many programs only support V3 (Windows 3.0) as well as most information you can find on the Internet refers to V3 bitmaps.Originally Posted by Delfi
I tried PSP 7 demo and it worked fine, I also compared 32bit BMP saved by Delphi's TBitmap with Imaging's bitmap and apart from top-down/bottom-up difference they were the same. I really don't know what is wrong here. Maybe that they are top-down can the cause of your problems - please try to remove - sign from [pascal]BI.Height := -Height;[/pascal] on line 671 in ImagingBitmaps.pas and see if it helps (image will be flipped though).Originally Posted by Delfi
Vampyre Imaging Library
Earth Under Fire (PGD Big Boss 3rd place)
Domains Of Chaos (PGD Multiplexity 5th place)
Now I am building my text/font manager, all based on your library - it's of great help.
I think, your creation would benefit from supporting the lanczos filter for resizing. It's one of the slowest I know (see IrfanView - it's a viewer that supports this filtering mode) but it's awesome in how it manages to keep the picture visually sharp even if your new size is just one pixel bigger. Bicubic blurs mercilessly in such cases.
Imaging already supports Lanczos and other filters. It is only that ResizeImage function usesI think, your creation would benefit from supporting the lanczos filter for resizing.
only nearest, bilinear, and bicubic filtering to make low level interface functions in Imaging.pas unit simpler.
If you want to try other filters look at StretchResample functions in ImagingFormats.pas unit. You can even design your own filter and pass it to overloaded StretchResample.
[pascal]type
TSamplingFilter = (sfNearest, sfLinear, sfCosine, sfHermite, sfQuadratic,
sfGaussian, sfSpline, sfLanczos, sfMitchell, sfCatmullRom);
procedure StretchResample(const SrcImage: TImageData; SrcX, SrcY, SrcWidth,
SrcHeight: LongInt; var DstImage: TImageData; DstX, DstY, DstWidth,
DstHeight: LongInt; Filter: TSamplingFilter; WrapEdges: Boolean = False); overload;
procedure StretchResample(const SrcImage: TImageData; SrcX, SrcY, SrcWidth,
SrcHeight: LongInt; var DstImage: TImageData; DstX, DstY, DstWidth,
DstHeight: LongInt; Filter: TFilterFunction; Radius: Single;
WrapEdges: Boolean = False); overload;
[/pascal]
Vampyre Imaging Library
Earth Under Fire (PGD Big Boss 3rd place)
Domains Of Chaos (PGD Multiplexity 5th place)
Wow.
Thanks. Sorry I did not look deeper. ops:
Imaging v0.24 will be released in one or two weeks.
It will feature new GIF and PSD image support (and beta TIFF support)
and many bug fixes.
Vampyre Imaging Library
Earth Under Fire (PGD Big Boss 3rd place)
Domains Of Chaos (PGD Multiplexity 5th place)
Splendid
When I finish tearing through the bug hordes in my engine I'll give it a try ops:
It's nice to have lanczos resample option when loading non-power-of-2 images into textures.
P.P.S. I turned the compiler optimization settings to maximum and suddenly the lanczos resizing accelerated immensely, as if getting a good punt. I test it on two large pictures being resized to 1024x2048, and they, kind of, load in a blink of an eye now.
It was FPC 2.0.4 with -Op4 -Ou -O3 -Or (target Pentium 4, uncertaing optimizations on, maximum optimization, keep certain variables in registers). My CPU is Sempron (a renamed older version of Athlon XP).
One more reason to build Vampyre Imaging directly from sources
[quote="Chebmaster"]P.P.S. I turned the compiler optimization settings to maximum and suddenly the lanczos resizing accelerated immensely, as if getting a good punt. I test it on two large pictures being resized to 1024x2048, and they, kind of, load in a b]
Looks like FPS's optimizations are getting better and better (in my results from Bench Imaging demo it is faster than Delphi in numerous tests - that was not the case a while ago).
Yeah true. If only there was some JPEG2000 library in native Pascal so Imaging wouldn't need those ugly C object files and have everything in Pascal.Originally Posted by Chebmaster
Vampyre Imaging Library
Earth Under Fire (PGD Big Boss 3rd place)
Domains Of Chaos (PGD Multiplexity 5th place)
Bookmarks