Results 1 to 10 of 12

Thread: Saving a screenshot in Asphyre Extreme?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Asphyre uses TAsphyreCanvas and not regular pascal TCanvas.
    I think that TAsphyreCanvas is named like so only becouse it also supports several similar drawing fuctions (DrawLine, DrawEclipse, DrawPicture instead of DrawGrapgic, etc.) like normal canvas does but it doesn't support direct saving of its contents into files.

  2. #2
    But can't content of TAsphyreCanvas be copied to regular canvas?

    Even if you'd do this pixel-by-pixel (getting pixel's x/y and putting this pixel into normal canvas at proper positions) it shouldn't take long. Unless there is some blitting function to copy from AsphyreCanvas into regular one and vice versa - then it is even faster.

    Anyway, JPG is terrible for screenshots as I said earlier and I strongly recommend trying other means to save it at least to bmp (you can then open this bmp with invisible TImage, save as png and remove bmp file to save space).

  3. #3
    Quote Originally Posted by Darkhog View Post
    But can't content of TAsphyreCanvas be copied to regular canvas?
    Not easily. You see content of TAsphyreCanvas is a TDXTexture which is saved in graphical memory itself. Now if you would be exporting this content your would first need to chage its type as the Textures saved in graphical memory are not in same format as ordinary TCanvas or TBitmap uses.

    Anywhay if you are so against JPG images I'm sure it would be much easier to change the mentioned component itself so it would be able to store the image in different format. I'm sure JPG was used as both Delphi and FPC come out with JPEG file format support so you don't need any third party units or components for it to work.

    EDIT: Just checked the source code of TScreener component and it could be easily modified to also save screenshots in other formats including (BMP, TGA, JPEG, PNG).
    Now I'm not sure that all of theese formats are enabled by default or need some atitional external libraries but it is doable with only a slight change in components code.
    Last edited by SilverWarior; 14-06-2013 at 09:29 PM.

  4. #4
    I'm not against JPEG by itself, but lossy compression in general - it might be good for photos, but for screenshots it is terrible.

  5. #5
    Quote Originally Posted by Darkhog View Post
    I'm not against JPEG by itself, but lossy compression in general - it might be good for photos, but for screenshots it is terrible.
    That laregly depends on compression level and the picture itself.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •