Jump to content

Anders Melander

Members
  • Content Count

    2561
  • Joined

  • Last visited

  • Days Won

    133

Everything posted by Anders Melander

  1. And then there's this one about "Code Profiling, Optimization, Performance, and Memory Leaks" (in which the audio worked but the video didn't, so it's two hours of power point) which manages to completely avoid the topic of profiling...
  2. Anders Melander

    dlsym and symbols

    Ah, I didn't realize who you represented. I'll let you figure it out for yourself then 🙂
  3. Anders Melander

    dlsym and symbols

    Are you patching the compiled binaries or are you generating resource modules for use with the RTL's built-in localization system?
  4. Anders Melander

    SpaceBallz

    John weeps 😢
  5. Anders Melander

    TImage (JPG) not scaling, but PNG and BMP DO ???

    That shouldn't matter. Regardless of the dimensions of the jpeg image, it (or rather the internal TBitmap representing the decoded image) will be stretched to fit the target rect. procedure TJPEGImage.Draw(ACanvas: TCanvas; const Rect: TRect); begin ACanvas.StretchDraw(Rect, Bitmap); end;
  6. Anders Melander

    TImage (JPG) not scaling, but PNG and BMP DO ???

    Weird indeed. Can you tell if it's the TImage itself or only the content which isn't being scaled?
  7. Anders Melander

    TImage (JPG) not scaling, but PNG and BMP DO ???

    That's pretty useless - "OT" or not. He's using a TImage.
  8. Anders Melander

    Command-line build slower than IDE build

    I'm guessing the IDE build is using an internal unit cache when it's building. Try comparing an external build through msbuild with an IDE build where the project is configured to use msbuild (Project->Options->Building->Delphi Compiler->Use MSbuild...)
  9. Anders Melander

    Delphi 11.1 IDE - Control + Click doesn't open FireDAC units

    Doesn't the trial come with full source... Asking for a friend 🙂
  10. Anders Melander

    Delphi 11.1 IDE - Control + Click doesn't open FireDAC units

    Okay, if that doesn't resolve the problem I suggest you try using SysInternal's ProcMon to determine what's going on. Filter on bds.exe and enable the trace just before you do a [Ctrl]+[Enter].
  11. Anders Melander

    Delphi 11.1 IDE - Control + Click doesn't open FireDAC units

    Check if $(BDS)\source\data\firedac is in your browsing path: Tools->Options->Language->Delphi->Library->Browsing path. Does the folder exist on disk? If you [Ctrl]+[Enter] on a FireDAC unit in the uses, does that open the file?
  12. Anders Melander

    Delphi 11.1 is available

    I meant from their perspective.
  13. Anders Melander

    Delphi 11.1 is available

    I don't think it was the environment that turned the forums poisonous. I think it was the almost complete refusal to acknowledge the many problems which alienated a lot of former champions of Delphi (myself included) and made them feel betrayed. Disgruntled fans are often very vocal in their criticism. Anyway, water under the bridge.
  14. Anders Melander

    Delphi 11.1 is available

    I remember that incident. Classic Nick.
  15. Anders Melander

    Delphi 11.1 is available

    So, "paid" shills. My bad for thinking it was something else. I guess I could have just googled it: https://www.embarcadero.com/embarcadero-mvp-program https://community.embarcadero.com/blogs/entry/are-you-asking-about-mvp-1407 LOL
  16. Anders Melander

    Delphi 11.1 is available

    Such as?
  17. Anders Melander

    Delphi 11.1 is available

    Why? I thought it was an honorary title.
  18. Anders Melander

    Micro optimization: IN vs OR vs CASE

    Okay then, here's a comment: If you really cared about performance then you would profile your code and direct your efforts at areas that would make an actual difference on a higher level.
  19. Source attached. I use this code in most of my open source/freeware tools. Features: Fades image in/out on show/hide. Can be moved with the mouse. Automatically hidden when deactivated. A text can be displayed on top of the image. Text can be scrolled to create vertical banner. Can play a audio resource while visible. Can also be used as an "About box". Things to note: Splash does not "stay on top" when running in the debugger. This is by design. Doesn't handle HighDPI scaling well (image isn't scaled). SplashDemo.zip
  20. Anders Melander

    Problem with ClientToScreen() on Multiple Monitors

    So place a breakpoint on the call to ScreenToClient and see what's going on. Easy Peasy.
  21. Anders Melander

    Problem with ClientToScreen() on Multiple Monitors

    So you haven't tried to reproduce the problem with two monitors...? Yes. If you had looked at the source you would have seen that TControl.ClientToScreen calls TControl.GetClientOrigin which ends up calling Winapi.Windows.ClientToScreen(Handle, Result); The ClientToScreen API function returns the coordinates relative to the top left corner of the primary monitor, which is what you'd want.
  22. Anders Melander

    Any example bitmap to grayscale?

    Nooooooooo! No. No. No. NO. Change the pixelformat to pf32bit Desaturate the RGB: (* Rec. 709 (also used by Gimp) *) // Y = 0.21 × R + 0.72 × G + 0.07 × B const LuminanceMultR = 54; LuminanceMultG = 184; LuminanceMultB = 18; function Desaturate(Color: TColor): TColor; var Luminance: byte; begin Luminance := (((Color and $00FF0000) shr 16 * LuminanceMultR) + ((Color and $0000FF00) shr 8 * LuminanceMultG) + ((Color and $000000FF) * LuminanceMultB)) shr 8; Result := (Color and $FF000000) or (Luminance shl 16) or (Luminance shl 8) or Luminance; end; procedure Desaturate(Bitmap: TBitmap); begin ASSERT(Bitmap.PixelFormat = pf32bit); for var Row := 0 to Bitmap.Height-1 do begin var p := PDword(Bitmap.ScanLine[Row]); var Col := Bitmap.Width; while (Col > 0) do begin p^ := Desaturate(p^); inc(p); dec(Col); end; end; end;
  23. Anders Melander

    Can someone provide inbound and outbound ports used by IDE?

    Better now?
  24. Anders Melander

    Delphi 11.1 is available

    Who needs unicorns and rainbows when we now have awesome user interfaces technologies like this: The possibilities seems endless. . .
  25. Anders Melander

    Can someone provide inbound and outbound ports used by IDE?

    Bad day? Did someone claim it doesn't work? As far as I can tell he just asked a question.
×