Jump to content

Cristian Peța

Members
  • Content Count

    343
  • Joined

  • Last visited

  • Days Won

    4

Posts posted by Cristian Peța


  1. On 5/15/2020 at 12:04 AM, Tntman said:

    I know but win api is too difficult for me

    Then probably what I proposed (to adapt the component from FMX to VCL) is also too difficult for you.

     

    On 5/15/2020 at 12:04 AM, Tntman said:

    BTW, do you know why we have such a difference in size when SS is saved? 

    uses
      Vcl.Imaging.pngimage;
    
    procedure SaveBitmapToPNG(ABitmap: TBitmap; const AFileName: String; ACompresionLevel: Integer = 7);
    var
      img: TPngImage;
      strm: TFileStream;
    begin
      img := nil;
      strm := TFileStream.Create(AFileName, fmCreate);
      try
        img := TPngImage.Create;
        img.CompressionLevel := ACompresionLevel;
        img.Assign(ABitmap);
        img.SaveToStream(strm);
      finally
        strm.Free;
        img.Free;
      end;
    end;

    Here TBitmap is a Vcl.Graphics.TBitmap
     


  2. TCameraComponent  is using FMX.Graphics.TCanvas and you should replace with Vcl.Graphics.TCanvas and so on.

    Look what TCameraComponent is doing and do the same using Vcl units.

    Some things are not the same but with some work I think it should be doable.


  3. Accessing camera has nothing to do with VCL or FMX. It should be feasible to copy what FMX.Media.TCameraComponent is basically doing (trimming all the FMX part) and make you own simple component for VCL.

    At least that's what I would do.


  4. I don't understand. Have you reproduced this on your machine? Then you can debug and see the call stack.

    If not, then as @Lars Fosdal said: get MadExcept or EurekaLog and don't waste your time.

    I dot't know how EurekaLog is but with MadExcept you need only to install it and check the checkbox that you want it in your app. That's all. Then you will have a full call stack to see where this happens in your code.


  5. 3 hours ago, Fr0sT.Brutal said:

    Instead of compiling scripts inside your app (which is pretty exotic) why don't just use scripts?

    Some sort of compilation to an intermediate representation must be there. Not to machine code but something much faster than parsing every time the source. Otherwise it will be very slow.

    I use FastScript and there is a compilation before execution. Execution is dozens times faster than compilation.


  6. On 11/6/2019 at 8:14 PM, Mike Torrettinni said:

    I thought he meant that Delphi could detect Delphi running in other VMs and it could affect (prevent?) registration... that would be pretty interesting.

    My VMs are connected to network and 10.1 does complain if 10.2 or 10.3 are started in an other WM. Probably because every WM does have an other IP (VMware stuff).
    "Duplicate License Key found. The same license key is used on 192.168.136.152. Please install a separate license"

    But starts and works.

     

    But 10.2 and 10.3 doesn't say anything.

     

    • Like 1
    • Thanks 1

  7. 25 minutes ago, Yaron said:

    6GB RAM, Android 9 to verify that my apps work on the latest Android version and to play with tablet layouts.

    It has a 64bit octa-core chip, but still runs Android 32bit.

    Running in 32 bit mode and accessing more than 4GB....

    I thought this is a relic of an ancient era.


  8. I don't think so. 64 bit OS will use more memory than a 32 bit. With 2GB RAM it's better to run in 32 bit mode.

    I have a Samsung A10 (model SM-A105FN released 2019) with 2GB RAM and running in 32 bit mode.

     

    PS. It's running Android 9

×