As per subject, there is only image compression for TIFF image type, code as below:
Dim tiffCompression As GdPicture14.TiffCompression = _gdPictureImaging.GetTiffCompression(_currentImage)
and this will return all the available tiffCompression as below:
TiffCompressionUnknown = 0
TiffCompressionNONE = 1
TiffCompressionRLE = 2
TiffCompressionCCITT3 = 3
TiffCompressionCCITT4 = 4
TiffCompressionLZW = 5
TiffCompressionOJPEG = 6
TiffCompressionJPEG = 7
TiffCompressionADOBEDEFLATE = 8
TiffCompressionNEXT = 32766
TiffCompressionCCITTRLEW = 32771
TiffCompressionPACKBITS = 32773
TiffCompressionTHUNDERSCAN = 32809
TiffCompressionDEFLATE = 32946
TiffCompressionAUTO = 65536
But there is no other compression for image type like GIF, JPEG, PNG.
Please help on this. Thanks.
Please find the requested methods here:
for JPG (see Quality, Progressive parametets)
for PNG (see CompressionLevel parameter)
Please refer to the parameters and set them according what you need.
This is not what I want.
I would like to have something like the code below:
Dim gifCompression As GdPicture14.GifDisposalMethod= _gdPictureImaging.GetGifCompression(_currentImage)
And it will return something like:
Public Enum GifDisposalMethod
GifDisposalMethodNotSet = -1
NoDisposalMethod = 0
DoNotDispose = 1
RestoreBackgroundColor = 2
RestoreToPrevious = 3
Dim jpgCompression As GdPicture14.JpgDctMethod= _gdPictureImaging.GetJPGCompression(_currentImage)
And it will return me something like :
Public Enum JpgDctMethod
Dct_Not_Set = 0
Dct_ISlow = 1
Dct_IFast = 2
Dct_Float = 3
The JPG, PNG, GIF formats are others than TIFF. The toolkit opens jpg/png/gif formatted files into a bitmap. Once they are opened, there is no information about the used compression available. And actually, it is not needed, as you should next save the images always defining the required compression. May I ask to explain in details your use-case why you need to know the used compression so maybe we can help you further? Thank you.
This is the behavior of our application.
We will show the compression method when users click on picture.
Is it really no way to show this ?
Any update about this issue ?
Here are some useful links:
https://superuser.com/questions/919580/ ... t-is-lossy
https://photo.stackexchange.com/questio ... cular-jpeg
Maybe there is a confusion between compression schemes and options used by the compression schemes:
JPEG uses always dctdecode, PNG always uses deflate, GIF LZW.
Almost each compression schemes are using different options. Some of them can be retrieved by exif metadata.
Who is online
Users browsing this forum: No registered users and 2 guests