I am finding the language reference entry on Database.PictureValue confusing and am obviously missing something:

it says:


aDatabaseField.PictureValue( Format as String=Picture.FormatPNG,quality as Integer= Picture.QualityDefault ) = newPictureValue or PictureValue = aDatabaseField.PictureValue(Format as String=Picture.FormatPNG,quality as Integer= Picture.QualityDefault)

Gets or sets the PictureValue using the specified picture format.[/quote]

So when saving a TIFF picture we can change it’s format explicitly to say a JPEG for storage in the DB and on retrieval we could convert it explicitly to a PNG?
That is what the above implies to me.

But does not picture.format only apply to saving a picture to a file? is using it defining the data format for the bytes in the database? If so why would we need to specify the format (or want to change the format before loading it into an xojo picture- which could be lossy) when reading it from the DB? should we not just get back what we put in?

But then the language reference ALSO says:

Since the all the parameters in the top versions have default parameters, are not the bottom versions redundant? If not why not? If so how?

If the they are the same and there are format conversions if you specified a different format going in, because of the default parameters, retrieving without paramters could be lossy because of intermediate format or quality change

Basically I don’t understand why the parameters are there or when they should be used. Whatever the source/format/quality used to create the Xojo picture once we store it in the DB, should we not always get the same thing we put into the DB back?