-2

How can i store TIFF image in Oracle DB as BLOB field? The same image i need to display in the UI by querying the DB again after some time.

I could see some codes for higher versions of delphi. I need it for Delphi 6 without using third party dlls and Components

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
  • What about a `TWicImage`, surely those must have been available in Delphi 6, and supports whatever image formats are supported by the underlying Windows. This was introduced I believe in Windows XP SP3, so older Windows versions you'd have to install a Windows Update separately to have this. – Jerry Dodge May 16 '14 at 20:00
  • @jerry WIC would get it done. But you'd need to get the COM interfaces defined. – David Heffernan May 16 '14 at 21:52
  • 2
    @JerryDodge: `TWICImage` was introduced in Delphi 2010. – Remy Lebeau May 16 '14 at 22:30
  • @Jerry: Delphi 6 was released right around the same time as XP was originally, and WICImage didn't exist at that time. (As you mention, it was added in XP SP3, which was *considerably* later, and was never retroactively added to SP2 or any other prior Windows version.) There are drawbacks to using a 15-year old IDE, and one of them is that modern features are not available. – Ken White May 16 '14 at 22:52
  • That's what I figured, I've gotten too used to using XE2 – Jerry Dodge May 16 '14 at 22:59
  • @KenWhite But it is not actually that difficult to use WIC from D6. You just need to translate enough of the COM interfaces that are how WIC is exposed. – David Heffernan May 17 '14 at 11:35
  • @David: I never said it was difficult. I said that Jerry's information about WICImage was wrong, not that it couldn't be used in D6. WICImage did not exist when D6 was released, so it clearly wasn't available in D6. – Ken White May 17 '14 at 12:58

1 Answers1

4

Delphi 6 does not come with libraries that can save and load TIFF images. Since you have ruled out the use of third party libraries you will need to write TIFF image loading and saving yourself.

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
  • Could you please let me know the code snippets to write it by our self? – user3880804 May 16 '14 at 17:14
  • 3
    You obtain the tiff specification and code to that. This is not something that you do with snippets. It's a major piece of work. – David Heffernan May 16 '14 at 17:17
  • @santhosh You can find the TIFF specifications here https://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf . As David said, it's a complex format with a number of different permutations and is a major undertaking. – Graymatter May 16 '14 at 18:07
  • 2
    Smart people don't reinvent the wheel. – Warren P May 16 '14 at 19:12
  • @WarrenP Unless you're enhancing the wheel, for example adding rocket boosters to make a hovercraft :-) Still obviously a tremendously complex project. – Jerry Dodge May 16 '14 at 19:58
  • 1
    @Jerry: In that case, you're not **reinventing** the wheel, but **redesigning** it. With software, that's done by **upgrading**. – Ken White May 16 '14 at 22:54