Jump to content
Attila Kovacs

TBitmap32 to jpg (graphics32)

Recommended Posts

So you are classify your own library as a short time solution? Then why does the same code work with it and not with the built ins?

Edited by Attila Kovacs

Share this post


Link to post

just an example, citing from your library

 

with TJpegImageHack(jpeg{<-TJPEGImage sic.}).Bitmap do
     ... Canvas.Lock;.....

 

Who on earth should know such internals? Better said, why should anyone care about such internals?

Nobody and for no reason and it's not in my code and it's not in the manual, but it's in your lib, and it works.

 

 

Edited by Attila Kovacs

Share this post


Link to post
2 hours ago, Attila Kovacs said:

So you are classify your own library as a short time solution?

No. What I'm saying is if you just need this to solve a short term problem - ie convert 1000s of images as a one off, then a hidden bug is not likely to cause grief. But if this code is going to be used for a very long time, then I'd recommend digging a little deeper and trying to locate the root cause of your memory consumption. (And I really am trying to help, not gang up on you.)

 

  • Like 1

Share this post


Link to post
3 hours ago, Attila Kovacs said:

with TJpegImageHack(jpeg{<-TJPEGImage

It's not pretty, but on occasions it's a useful way around protected properties and methods.

Share this post


Link to post

There would be more than enough scripting languages to go for a one time conversion.

I have no interest in digging deeper in the VCL when you already made a working library.

Also, I'm more than happy not to have to deal with TBitmap, so again, no point to burn resources on things I don't need.

 

 

Share this post


Link to post
4 minutes ago, angusj said:

It's not pretty, but on occasions it's a useful way around protected properties and methods.

I don't care the prettiness, all what I mean is I would never come up with the idea to patch TJPEGImage to be thread safe. Or maybe yes, after a week of trial and error.

Do I really supposed to do that? I don't think so.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×