I'd like to use LibTiff with XE3 to access image meta data information from TIFF files.
I need to find the number of pages inside tiff and their sizes.
I suggested LibTiff because I need the fastest possible implementation of reading tiff image meta data.
The only link I have found is not working anymore:
http://www.awaresystems.be/imaging/tiff/delphi.html
OK, Internet Archive has returned back to operational state, and here is your download:
LibTiffDelphi, full version. Large download (approx 1.39 megabyte), includes Debug and Release versions
Well, the download links at that site do appear to be down. You could try downloading from here instead: http://www.vdebris.comli.com/wp-content/uploads/2009/09/libtiffdelphi_3_9_1.rar
I think you could use Mike Lischke's GraphicEx to solve your problem. The TImageProperties record that is made available by the TGraphicExGraphic class appears to have what you need.
found that code working with *.tif and used graphics + lib for solution building TIF SPLITTER
not sure if it helps to solve your problem
Related
For quite some time now there have been several image codecs which provide significant improvements over PNG and JPG, however the latter still remain dominant.
Two formats in particular that I'd really like to see getting more adoption are FLIF and BPG. They seem superior in every possible way to JPG and PNG (except for lacking market acceptance). Especially FLIF seems extremely promising.
TL;DR = Besides supporting them in my own software, is there a way to get FLIF and BPG support in imagemagick?
The ChangeLog for ImageMagick says
2015-06-25 6.9.1-7 ... * Support BPG image format
There's no direct BPG support in the ImageMagick source code, but config/delegates.xml lists delegates "bpgdec" and "bpgenc" which convert BPG files to and from PNG files which then get processed by ImageMagick. You would have to supply those delegates if they aren't already on your system. You can download the sources for bpgdec and bpgenc from
http://bellard.org/bpg/
There's nothing about FLIF in the ChangeLog, but a "pull request" for FLIF support was recently applied, and coders/flif.c exists in the ImageMagick sources (it requires a separate libflif to work). You can download the source code for libflif from https://github.com/FLIF-hub/FLIF
I haven't tested either feature.
bpgdec, bpgen, and libflif are all LGPL-licensed, and a reduced version of bpgdec is available under a BSD license.
To get imagicmagick to work with .bpg you have to compile it separate from what is already there. In other words, you have to add it in. So download the source code and it doesn't compile. Give up and use something else or try this because I got it to work
use apt-get and install
libpng*
libsdl1*
libsdl2*
libsdl-image*
cmake
libjpeg*
and maybe libjpg*
decompress the .bpg files you downloaded and just
use the command
make and sudo make install
AFTER that imagemagick will work with libpg and will not give an error of a missing delegate..
I have a Remote Administration Tool and was necessary change for 64 bits plattform. I have used Zlib for compress and decompress memorystreams, but after do this change, Zlib classes showed several errors when I tried compile my project in 64 bits plattform, because Zlib only is avaiable for 32 bits plattform.
Then,I had that search on internet for some similar classes for make compress and decompress of memorystreams and I found this question where discussion is about LZMA class that also can make like I need, similar to Zlib class.
And I understood the advice:
The big issue that you will face is that the library you have chosen to use requires you to know how large the file is that you are decompressing.
So, I'm here exactly for know some suggestion for try solve this trouble.
In others words, I want know how decompress exactly the size of memorystream that is received by Server side of my project?
Any opinion or suggestion here is welcome.
OK, it looks like you're using ZLibEX, by Roberto Della Pasqua, Borland:
https://github.com/senjaxus/Delphi_Remote_Access_PC/blob/master/Fontes%20Access%20PC%20-%20Delphi%207/Cliente/ZLIBEX.pas
You're correct - the assembly portion MoveI32 is non-portable.
BUT ...
You should be able to use the same API in your current Delphi XE-5 from System.Zlib:
http://docwiki.embarcadero.com/Libraries/XE5/en/System.ZLib
http://delphiblog.twodesk.com/native-zip-file-support-in-delphi-xe2
http://docwiki.embarcadero.com/CodeExamples/Seattle/en/ZLibCompressDecompress_%28Delphi%29
Has anyone had luck converting and using jpeg2000 on the ios? I am writing and inventory app and would love to go with a jpeg2000 file type if I can figure out how to get the phone to support it.
I have seen that there is a nice project for webp - https://github.com/carsonmcdonald/WebP-iOS-example - which seems like it would also work but I think the jpeg2000 results are even better.
Just trying to eval options. Thx in advance
We used JPEG 2000 for my last project (Spot.app)
I downloaded the official open-source JPEG 2000 codec source from here: http://www.openjpeg.org/index.php?menu=download
Build it into a static library and voila.
Here's some sample code I created: https://gist.github.com/1861465
Image IO has nice image conversion functions that eliminate the need for 3rd party code. See more here: How do I convert UIImage to J2K (JPEG2000) in iOS?
No need to bring in the JPEG 2000 project.
I'm currently working on a project with OpenEXR and I would like to implement some Blob detection algorithms. To do this I figured that I could use OpenCV as it says in the documentation that it can open OpenEXR format files.
I have all the libraries installed and working as I've been doing other things. I open a simple jpg file with openCV cvLoadImage. It works fine. But when i try to open any .exr file it doesn't seam to like it. I get a gray window where there should be the image display.
Has anyone done any tests with OpenCV and OpenEXR libraries working together? Have they worked for you? What do you think?
Thanks.
Yes, that's done, I posted a Ticket in the OpenCV project at willowGarage and they made all needed changes, you now can use OpenEXR with OpenCV as before!
Great
My HDR tone mapping algorithm will work again, cool
Have a nice programming now ;o)
Alex
Well Alex!
My news aren't really encouraging... I tried to use OpenEXR with OpenCV but it's not doing it's work. It says in the documentation that OpenCV 2.0 has OpenEXR support but...
I've searched the web to find some example of working EXR images in OpenCV but had no luck.
At this time I've developed myself a function to convert an image read with the OpenEXR libraries that uses Ilm::Rgba* structure to save the pixels of the image and convert it to char* that OpenCV uses with images. The IlpImage structure is the one I use. Actually I'm working with an example from OpenFrameworks and using they're Image structure...
It's a really early stage in my development because I had to start over...
I hope this can help you... but if you enter the world of OpenEXR it's a pretty dark world in terms of documentation, so all I can say is good luck!
Feel free to contact me and I'll see if I can help you!
This question is rather old now, but I noticed whilst reading the OpenEXR manual today that it says (whilst talking about reading named channels)
If one of those channels is not present in the image file, the corresponding memory buffer for the pixels will be filled with an appropriate default value.
I'd speculate here that the grey image you are seeing is an "appropriate default value".
i have tried to open some JPEG files in Delphi with TImage component. i also added the Jpeg unit. i can open most of jpg files and there is no problem.
but when i try to open some JPGs, the program just throw an exception.
i also tried to load that images in design mode, but there is some problem. in design mode the exception is:
Access violation at address 402672A1 in module 'vcljpeg70.bpl'. Write of address 08E84000
Why i cannot open that JPGs? they are not corrupted. i checked them in some tools like savantools EXIF viewer.
here is the URL of one of that images:
http://xs842.xs.to/xs842/09340/backpic435.jpg
Thanks so much
PS:
My Delphi version is 7. Borland Delphi 7
The reason you may be encountering this problem is due to the file type. Delphi has issues displaying JPEG images that have been encoded using CMYK, rather than the default RGB encoding. CMYK is a format that is generally used for Print design, try and always encode your images to RGB format to avoid this issue with Delphi.
Patch for Delphi jpeg.dcu
Bye.
Interesting. Neither Internet Explorer nor Google Chrome will display that JPEG image you linked to. I do not get 404 Not Found errors, I simply get an image placeholder, indicating that the image could not be opened/displayed correctly.
FireFox does display the image.
Are you certain that there is not something fishy, or at least slightly unusual, about the JPG files involved?
UPDATE: The file linked to in the question opens in PaintShop Pro (an old version 6.0 installation) - if I then simply re-save as a Standard Encoding JPEG, IE and Chrome both display the newly saved image as I'd expect. There would definitely appear to be something a bit "odd-ball" about the encoding of the original JPEG that some JPEG apps can handle but not all, including some "major players", not just Delphi. :)
Check out the Free Image library for alternative JPEG support in Delphi if the native one has problems. Free Image is an open source lib that lets you work with JPEG/PNG/... from Delphi/BCB/and others. Very nice library IMHO.
http://freeimage.sourceforge.net/
I've looked at the file with a hex editor, and found 3 JFIF headers. After extracting each part, I found 2 thumbnails and an image. Nothing special, because embedded thumbnails seem to be part of the EXIF2 standard.
The thumbnails themselves load fine in Delphi, and converting the file to something readable can be done with almost every piece of software that I've tried.
Anyway, this page will give you very detailed information about the picture, and what headers are inside (just paste the url of your image in the textbox):
http://www.monster-submit.com/resources/jpeganalyzer/
I get the same error. This appears to be a bug in Delphi's JPEG lib. You should report it to QC.
SimDesign's NativeJpg can open that file. It's a JPEG library written entirely in Delphi, and the author has been good about adding support for new extensions and color spaces when we've run into them. In addition to a TGraphic descendant for TImage support it exposes lots of lower-level interfaces for manipulating JPEGs, though I haven't used them.