Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GDT_Int8 support (RFC 87) #6633

Merged
merged 1 commit into from
Nov 16, 2022
Merged

Add GDT_Int8 support (RFC 87) #6633

merged 1 commit into from
Nov 16, 2022

Conversation

rouault
Copy link
Member

@rouault rouault commented Nov 8, 2022

On reading, PIXELTYPE=SIGNEDBYTE in IMAGE_STRUCTURE metadata domain is no longer reported in drivers that used to do it.

On writing, the PIXELTYPE=SIGNEDBYTE creation option is preserved in drivers that used to support it, but is deprecated.

@rouault rouault marked this pull request as draft November 8, 2022 10:32
@rouault rouault added this to the 3.7.0 milestone Nov 8, 2022
@mgoacolou
Copy link
Contributor

for consistency purpose it should be great to have the GDT_UInt8 as an alias of GDT_Byte witch is still ambiguous, isn't it?

@rouault
Copy link
Member Author

rouault commented Nov 8, 2022

for consistency purpose it should be great to have the GDT_UInt8 as an alias of GDT_Byte witch is still ambiguous, isn't it?

I had indeed pondered about that. GDT_Byte is not strictly speaking ambiguous as it has always been documented as a unsigned 8-bit integer (if one excludes the PIXELTYPE=SIGNEDBYTE hint that amends it). If we were to provide GDT_UInt8, this should by as a #define GDT_UInt8 GDT_Byte rather than as a proper enumeration value of GDALDataType, so that people who swith( eDataType ) don't have to include case statements for both GDT_Byte and GDT_UInt8.

@sgillies
Copy link
Contributor

sgillies commented Nov 8, 2022 via email

@rouault
Copy link
Member Author

rouault commented Nov 8, 2022

Ubyte (same as uint8) vs byte?

what do you suggest exactly: keep GDT_Byte in the enumeration and add #define GDT_UByte GDT_Byte to create the alias ?

@rouault rouault marked this pull request as ready for review November 16, 2022 10:34
On reading, PIXELTYPE=SIGNEDBYTE in IMAGE_STRUCTURE metadata domain is
no longer reported in drivers that used to do it.

On writing, the PIXELTYPE=SIGNEDBYTE creation option is preserved in
drivers that used to support it, but is deprecated.
@rouault rouault merged commit 103fdca into OSGeo:master Nov 16, 2022
@rouault rouault mentioned this pull request Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants