Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 10/13/23 in Posts

  1. Lars Fosdal

    Parallel Resampling of (VCL-) Bitmaps

    For me, the fastest blur is created by taking off my glasses...
  2. Joseph MItzen

    Update issue

    He just got 11.3 running; don't frighten him further.
  3. Hmmm... that's interesting and promising, because I have compared: OverbyteIcsHttpsTst1.pas with OverbyteIcsXferTst examples and maybe my problem is, that I'm using TIcsHttpMulti component instead of a simple TSslHttpCli. It seems that the "multi" version calls SSL initialization automatically inside .Download() method. (I'm not calling it from anywhere before starting the download.) So the solution seems to be to get rid of this nice "multi-download" component and use a simple CLI. Thank you VERY VERY much for all the time You have invested to test it for me and to write it down in this topic! :-)))) Good Night!
  4. You are wrong there. Your application can't start. And most ICS sample do load OpenSSL automatically at startup. Here how to stop loading OpenSSL before really needed: 1) Take OverbyteIcsHttpsTest.dproj sample program. 2) Locate THttpsTstForm.FormShow event handle in OverbyteIcsHttpsTst1.pas source code. 3) At the end of that handler, you'll find this code: OverbyteIcsWSocket.LoadSsl; 4) Comment out form that line (including it) to the end of the event hanlder. Recompile, copy the exe to a folder when OpenSSL is not there. Run the executable. It starts nicely. Enter an http URL (not https) and click "Get" button. You'll see the document downloaded. Enter a https URL and click "Get" button. This time you should get an error because OpenSSL DLL are not found. Copy OpenSSL and retry. Https link will work. Using ProcessMonitor you can see when the OpenSSL are loaded. I hope you understand I demonstrated the ICS application can start without OpenSSL DLL present and the SAME application can do https once the DLL are in place.
  5. The order of units with initialization code are better retrieved by the C=ICODE entries instead of the C=CODE ones.
  6. Kas Ob.

    Parallel Resampling of (VCL-) Bitmaps

    To my past working on resampling and resizing up and down, i found that Mitchell and Robidoux filter is superior to Lanczos(3) in speed and quality specially in halo reduction and color defects. https://legacy.imagemagick.org/Usage/filter/#mitchell https://legacy.imagemagick.org/Usage/filter/nicolas/ I added them to AlphaSkin few years back and it seems i failed to deliver them to the author, shame on me after all that work. Anyway found my old test project, and here a sample of the a result With Lanczos3 the halo effect is very visible inside the boxes and there a skyblue color above the T also there a yellow on left side of the red. While Mitchell and Robidoux (default, sharp and soft) , doesn't have halo and blue but the yellow exist Downsizing As seen above and as i remember with many images, Robidoux sharp was the best for upsizing, and Robidoux soft was the best in downsizing. And here are the parameters for Robidoux ftRobidoux: if Param < 1.0 then W := Sqr(Param) * (1.1218 * Param - 1.9327) + 0.8739 else W := Sqr(Param) * (-0.3739 * Param + 1.9327) - 3.2436 * Param + 1.7478; ftRobidouxSharp: if Param < 1.0 then W := Sqr(Param) * (1.238 * Param - 2.107) + 0.9126 else W := Sqr(Param) * (-0.4126 * Param + 2.1069) - 3.4759 * Param + 1.8253; ftRobidouxSoft: if Param < 1.0 then W := Sqr(Param) * (0.8204 * Param -1.4806) + 0.7734 else W := Sqr(Param) * (-0.2734 * Param + 1.4806) - 2.6408 * Param + 1.5469; No Mitchell though because it is already in AlphaSkin and i don't want to paste code that is not mine.
  7. mvanrijnen

    How do I execute code after FormShow ?

    Make an aftershow method, See here: SwissDelphiCenter.ch : ...implement AfterShow, AfterCreate events? I use this in baseforms, added a "FirstShow" boolean in the form, so you know if you have to do all calcs all the time or nly one time. So in my base form i have protected methods like procedure DoBeforeShow(const AFirstshow : Boolean); virtual; procedure DoAfterShow(const AFirstshow : Boolean); virtual;
  8. Sid D

    SBOM tool for Delphi

    Couldn't find one for Delphi.
  9. Remy Lebeau

    Minimizing Forms

    FYI, your manual setting is not guaranteed to be persistent. The Form's Handle CAN be recreated dynamically during the Form's s lifetime, which would lose your manual setting. If you want to customize the Form's owner window, you need to override the Form's CreateParams() method so your manual value takes affect on every HWND that the Form creates, eg: type TMyContestForm = class(TForm) ... protected procedure CreateParams(var params: TCreateParams); override; ... end; procedure TMyContestForm.CreateParams(var params: TCreateParams); begin inherited CreateParams(params); params.WndParent := 0; // or GetDesktopWindow() end;
  10. Anders Melander

    Parallel Resampling of (VCL-) Bitmaps

    You really do need to handle the alpha channel if you are going to operate on 32-bit bitmaps. Basically, it's the same as what you did for the resampler: Premultiply, blur, unpremultiply. Enable the checkerboard pattern in TImgView32.Background and you should be able to see it. Sure, that would be nice; Go ahead. Just make a version that has the same API as the existing ones: procedure Blur(Bitmap32: TBitmap32; Radius: TFloat); overload; and optionally: procedure Blur(Bitmap32: TBitmap32; Radius: TFloat; const Bounds: TRect); overload; procedure Blur(Bitmap32: TBitmap32; Radius: TFloat; const BlurRegion: TArrayOfFloatPoint); overload; If you start by posting to your own repository I can do the work required to get it integrated into Graphics32. My test bench validates the following: Edge handling Does the "outside" of the bitmap bleed into the blurred bitmap. Basically, I just blur a white bitmap and verify that all pixels are still white. Alpha bleed Does the color of fully transparent pixels bleed into semi-tranparent pixels. Color overflow No R, G, or B values should increase. A minor decrease, when blurring a solid color bitmap, is allowed. Loss/gain due to premultiplication I test the average color loss of blur of a solid color bitmap, with varying alpha. This mostly tests the precision of the premultiplication. Average RGB error and lightness change I blur a gradient and compare the average RGB-, and lightness change. Horizontal and vertical symmetry I blur some horizon and vertical lines and verify that they have been blurred symmetrically. Gaussian error I blur a line and verify that the blurred result corresponds to the Gaussian curve. RMS error and signal loss are validated. Vertical error I blur a vertical line and verify that all rows contain the same color value. Horizontal error I blur a horizontal line and verify that all columns contain the same color value. Uniform RGB I blur a sequence of solid color bitmaps, with increasing R=G=B and verify that the result doesn't contain noise. This usually catches simple over/underflows. The result looks like this: FastBlur (box), Angus Johnson [1024 x 1024, 10] PASS: Edge handling PASS: 100% alpha bleed: 0.00% bleed, 0 errors PASS: Overflows: 0, max swell: 0.00%, 0 bleeds PASS: Alpha: 31, Average loss, RGB: 0.92 %, A: 0.00% PASS: Alpha: 63, Average loss, RGB: 0.52 %, A: 0.00% PASS: Alpha: 95, Average loss, RGB: 0.26 %, A: 0.00% PASS: Alpha: 127, Average loss, RGB: 0.26 %, A: 0.00% PASS: Alpha: 159, Average loss, RGB: 0.13 %, A: 0.00% PASS: Alpha: 191, Average loss, RGB: 0.00 %, A: 0.00% PASS: Alpha: 223, Average loss, RGB: 0.00 %, A: 0.00% PASS: Alpha: 255, Average loss, RGB: 0.00 %, A: 0.00% PASS: Average RGB error: 0.48 % : Lightness change: -0.50 % PASS: Horizontal symmetry error: 0.00 PASS: Vertical symmetry error: 0.00 PASS: Gaussian RMS error: 7.94 FAIL: Gaussian signal loss: 6.67 % PASS: Vertical errors: 0 PASS: Horizontal errors: 0 PASS: Uniform RGB[ 31] errors: 0 ( 0.00 %), noise: 0 PASS: Uniform RGB[ 63] errors: 0 ( 0.00 %), noise: 0 PASS: Uniform RGB[ 95] errors: 0 ( 0.00 %), noise: 0 PASS: Uniform RGB[127] errors: 0 ( 0.00 %), noise: 0 PASS: Uniform RGB[159] errors: 0 ( 0.00 %), noise: 0 PASS: Uniform RGB[191] errors: 0 ( 0.00 %), noise: 0 PASS: Uniform RGB[223] errors: 0 ( 0.00 %), noise: 0 PASS: Uniform RGB[255] errors: 0 ( 0.00 %), noise: 0 In your mailbox in a few days, if you're lucky I'll include the test bench too. By the way, I can really recommend that you profile your implementation with VTune. This is an area that usually benefits greatly from that.
  11. I've never in my life seen it written like that. Sure it works. But when you read it, it's not familiar and so it makes you think about it. Impedence. Patterns matter.
  12. THeY fouND tHe cOdE On ThE InTeRwebS. It muST be ThE beSTESt!
×