Centura Image (JPEG) format
Centura Image (JPEG) format
Hello everyone,
We used an application written by Centura stores images (JPEG) in Oracle 11g database with LONG RAW data type. There should be no problem displaying this image is still the same application. However, now we need to export these images for viewing in another program and realize that the stored format is not standard. It consists of a header in Centura:JPEG
At the moment we cannot find any documentation on this archive format to convert our images to original format. We greatly appreciate if anyone knew any tool, code, or documentation that could help us.
Thank you
We used an application written by Centura stores images (JPEG) in Oracle 11g database with LONG RAW data type. There should be no problem displaying this image is still the same application. However, now we need to export these images for viewing in another program and realize that the stored format is not standard. It consists of a header in Centura:JPEG
At the moment we cannot find any documentation on this archive format to convert our images to original format. We greatly appreciate if anyone knew any tool, code, or documentation that could help us.
Thank you
You do not have the required permissions to view the files attached to this post.
-
- Founder/Site Admin
- Posts: 3522
- Joined: 24 Feb 2017, 09:12
- Location: Gouda, The Netherlands
Re: Centura Image (JPEG) format
Looking at the header of the data (stored in Oracle), it seems to be compressed data using
You need to extract the data from Oracle and uncompress it using
SalStrCompress
.You need to extract the data from Oracle and uncompress it using
SalStrUncompress
before using it in an external viewer.Regards,
Dave Rabelink

Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel
Dave Rabelink

Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel
Re: Centura Image (JPEG) format
Hi Dave,
Where can I download a trial version of TD IDE, so I can test `SalStrUncompress` and `SalStrCompress` functions?
Thanks
Where can I download a trial version of TD IDE, so I can test `SalStrUncompress` and `SalStrCompress` functions?
Thanks
-
- Founder/Site Admin
- Posts: 3522
- Joined: 24 Feb 2017, 09:12
- Location: Gouda, The Netherlands
Re: Centura Image (JPEG) format
Regards,
Dave Rabelink

Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel
Dave Rabelink

Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel
Re: Centura Image (JPEG) format
Do you have any documents about compression algorithm used byDave Rabelink wrote: ↑28 Dec 2020, 21:08Looking at the header of the data (stored in Oracle), it seems to be compressed data usingSalStrCompress
.
You need to extract the data from Oracle and uncompress it usingSalStrUncompress
before using it in an external viewer.
SalStrCompress
? Or any .exe program that input is compressed file, output is uncompressed file?Thank you very much
Re: Centura Image (JPEG) format
Hi Dave,
We registered for trial but not received email for download link.
We registered for trial but not received email for download link.
-
- Founder/Site Admin
- Posts: 3522
- Joined: 24 Feb 2017, 09:12
- Location: Gouda, The Netherlands
Re: Centura Image (JPEG) format
I did not download a trial before so I'm not sure how long it takes to get the email.
It could take a while maybe.
No. I do not know what algorithm Sal compression is using. But I'm quite confident it is a TD proprietary format.
Which TD version is used for the application right now which is saving/reading the images from the database?
It seems you do not have the source for that application and you are not a TD developer?
Regards,
Dave Rabelink

Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel
Dave Rabelink

Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel
Re: Centura Image (JPEG) format
We use a Centura 5 application developed by other developer without any source code. Their company was dissolved and now we need to switch to other software. However, it was necessary to convert some old data and we had this problem.Which TD version is used for the application right now which is saving/reading the images from the database?
It seems you do not have the source for that application and you are not a TD developer?
And yes, I'm not TD Developer, but I'll know a bit if I can download TD IDE trial and try uncompress this file. I also register to email but have not received any links, including in the spam folder.
Thanks.,
-
- Founder/Site Admin
- Posts: 3522
- Joined: 24 Feb 2017, 09:12
- Location: Gouda, The Netherlands
Re: Centura Image (JPEG) format
To follow up on this.
I have found an article in an old issue of CenturaPro.
See page 11 - Get That Picture Back
So the TD application got the jpeg image from a TD picture object, then compressed it and saved it to the database.
To get the original jpeg back, you need first to uncompress the data and then use the "strip off Centura header" as explained in the article.
The uncompress step is probably not needed. The SalStrCompress functionality will not compress data which can not be compressed any further.
Looking at the screenshot in the start post, the image in the database contains the original data.
You can check if the data is original by looking at the 4th byte.
When byte[3] = 0x2, the data is compressed.
When byte[3] = 0x0, the data is original.
As can be seen, the jpeg data in the database has byte[3] = 0x0, so the data is original.
What you can do in this case:
- Get the data from the database and strip of all bytes up to byte[14]. The first 15 bytes is the SAL compression header.
- Strip of the "Centura:jpeg" header. I think the function explained in article just removed the "Centura:jpeg" plus one null byte.
- Save the resulting data to file which will be the original jpeg file.
If the compressionheader byte[3] = 0x2, you need to uncompress the data first.
But I guess all jpeg images will be stored having the original data as the SAL compression is unable to compress jpeg compression any further.
I have found an article in an old issue of CenturaPro.
See page 11 - Get That Picture Back
So the TD application got the jpeg image from a TD picture object, then compressed it and saved it to the database.
To get the original jpeg back, you need first to uncompress the data and then use the "strip off Centura header" as explained in the article.
The uncompress step is probably not needed. The SalStrCompress functionality will not compress data which can not be compressed any further.
Looking at the screenshot in the start post, the image in the database contains the original data.
You can check if the data is original by looking at the 4th byte.
When byte[3] = 0x2, the data is compressed.
When byte[3] = 0x0, the data is original.
As can be seen, the jpeg data in the database has byte[3] = 0x0, so the data is original.
What you can do in this case:
- Get the data from the database and strip of all bytes up to byte[14]. The first 15 bytes is the SAL compression header.
- Strip of the "Centura:jpeg" header. I think the function explained in article just removed the "Centura:jpeg" plus one null byte.
- Save the resulting data to file which will be the original jpeg file.
If the compressionheader byte[3] = 0x2, you need to uncompress the data first.
But I guess all jpeg images will be stored having the original data as the SAL compression is unable to compress jpeg compression any further.
You do not have the required permissions to view the files attached to this post.
Regards,
Dave Rabelink

Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel
Dave Rabelink

Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel
-
- Founder/Site Admin
- Posts: 3522
- Joined: 24 Feb 2017, 09:12
- Location: Gouda, The Netherlands
Re: Centura Image (JPEG) format
Regards,
Dave Rabelink

Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel
Dave Rabelink

Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel
Re: Centura Image (JPEG) format
I tried this and it worked, the .net library for compressed data also worked too. I really appreciate your time to explain things. Thank you so muchDave Rabelink wrote: ↑05 Jan 2021, 08:55To follow up on this.
I have found an article in an old issue of CenturaPro.
See page 11 - Get That Picture Back
CenturaPro - 1998-05.pdf
So the TD application got the jpeg image from a TD picture object, then compressed it and saved it to the database.
To get the original jpeg back, you need first to uncompress the data and then use the "strip off Centura header" as explained in the article.
The uncompress step is probably not needed. The SalStrCompress functionality will not compress data which can not be compressed any further.
Looking at the screenshot in the start post, the image in the database contains the original data.
You can check if the data is original by looking at the 4th byte.
When byte[3] = 0x2, the data is compressed.
When byte[3] = 0x0, the data is original.
As can be seen, the jpeg data in the database has byte[3] = 0x0, so the data is original.
What you can do in this case:
- Get the data from the database and strip of all bytes up to byte[14]. The first 15 bytes is the SAL compression header.
- Strip of the "Centura:jpeg" header. I think the function explained in article just removed the "Centura:jpeg" plus one null byte.
- Save the resulting data to file which will be the original jpeg file.
If the compressionheader byte[3] = 0x2, you need to uncompress the data first.
But I guess all jpeg images will be stored having the original data as the SAL compression is unable to compress jpeg compression any further.
Who is online
Users browsing this forum: [Ccbot] and 1 guest