picture datatype PDTM_SCALE method wont work -> it works.
Hello, I can't get this to work, retreived image has same original size:
DoDTMethod(dto, NULL, NULL, PDTM_SCALE, dstW, dstH, 0);
... I have the DTM_PROCLAYOUT just after, and then I get the PDTA_DestBitMap , which is always of the original size, not dstW/dstH.
Absolutely no examples or working code source available for this anywhere on the planet, it seems, while the amiga documentation is documenting that since OS3.9 (and also this site)
code at:
https://github.com/krabobmkd/EmojiGear/blob/krb/mstd2/FriendSh3ep/bmima… , function bmimage_load_internal()
Pretty sure PDTM_SCALE is a v43 method - ie. it pre-dates even OS3.5, and therefore no reason why it wouldn't be in 3.2.
> no reason why it wouldn't be in 3.2.
Because OS3.2 was rewritten from OS3.1 and not OS3.5/ OS3.9 which sources were lost ? I don't know but it seriously match the OS3.1 datatype specs:
A few of what is documented in the datatype autodocs works in OS3.2:
- creating a datatype from an image array in ram instead of file disk -> don't work.
- creating a "blank" picture.datatype from neither file or memory, then fill is with WritePixel method -> don't work
only creation from file works so far.
- PDTM_Scale -> don't work.
- ...
... and of course also no program source on the planet actually ever used that, which doesnt help.
Also explains why the OS3.9 "skinnable CD player" would not have its skin displayed on OS3.2.
- I'm way more sorry than anyone by all this, I have to introduce terrible workaround in my codes because of that -
Also, there should just be existing test units covering 100% of the datatype API once for all..
v43 is Commodore, so they would have had those sources.
Regardless, this all works in OS4 and they had access to those sources too.
According to the AutoDoc, PDTM_SCALE was added in v45. Given it is mentioned in the AutoDoc I'd suggest it is implemented.
I also don't think PDTM_READ/WRITEPIXELARRAY will be broken or missing as it's highly likely the new datatypes added in 3.2 use them, and they pre-date OS3.5.
Maybe post your code as that might help see what is wrong?
arg,
I did a minimal test case about PDTM_SCALE, out of my app, tested changing options, entering formats and things ... and it works all the times oO.
Maybe my entering data was wrong in my app at some point. I don't know why it used to fail in my app context. I bypassed that to do the scaling myself anyway, with option for bilinear , so too late I will not get back to PDTM_SCALE.
That said, I also did a test case for "DTA_SourceType,DTST_MEMORY" and as said in another forum the datatype doesn't even open. (and also creating a datatype by feeding pixels with DTM_WRITE....)
Online Status
..... I 've just realized that not only PDTM_SCALE looks not implemented in OS3 picture datatype 47, but neither is PDTM_WRITEPIXELARRAY, or the ability to create a blank picture datatype from something else than a file, as already discussed in another thread, which would have allowed to remake the scale mecanism.