TIFF annotation coordinates - annotations

I need help trying to find a utility or method to search for annotations (filled rectangles) in tiff files and determine their coordinates. I'm not a programmer, but I'm profficient with vbscript and powershell....any suggestions would be greatly appreciated.
I'm not very familiar with the TIFF specification as you can probably tell....i've downloaded the specs from adobe, but can't make heads or tails of what i need.
i have looked at the following related post:
Tiff annotations
it suggested looking at:
http://web.archive.org/web/20030124024322/http://www5.eistream.com/support_pro/faqs/annospec.htm
which says that annotations are referenced in tag 32932....however, i've used libtiff.org's tiffinfo.exe to view the tags associated with a test file (that has an annotation).....it does not show tag 32932.
so that's where I'm at. again thanks in advance.

Related

How do I find more comprehensive Google Documentation for using its APIs

A lot of the times the Google documentation is incomplete and is missing things like libraries required to import. How do I view a more comprehensive example?
Example: https://cloud.google.com/vision/docs/detecting-faces#vision-face-detection-python
def highlight_faces(image, faces, output_filename):
"""Draws a polygon around the faces, then saves to output_filename.
Args:
image: a file containing the image with the faces.
faces: a list of faces found in the file. This should be in the format
returned by the Vision API.
output_filename: the name of the image file to be created, where the
faces have polygons drawn around them.
"""
im = Image.open(image)
draw = ImageDraw.Draw(im)
for face in faces:
box = [(vertex.x, vertex.y)
for vertex in face.bounding_poly.vertices]
draw.line(box + [box[0]], width=5, fill='#00ff00')
im.save(output_filename)
Missing the PIL import
On many of Google's code examples, there will be a VIEW ON GITHUB button that will take you to a complete working example rather than a snippet. Very useful for finding necessary library imports or just going straight to more code.
When that is missing, sometimes there is a link to the file like this firebase example linking to index.js:

How can I create in Gehpi directed tree graph instead of sphererical

I want to make a network graph which shows the distribution of our documents in our folder structure.
I have the nodefile, edgefile and gephi graph file in this location:
https://1drv.ms/f/s!AuVfRBdVHkO7hgs5K9r9f7jBBAUH
What I do is:
Run the algorithm ForceAtlas2 with scaling 10-20, dissuade hub marked and prevent overlap marked, all other standard setting.
What I get is a graph with groups radial/spherical distributed. However, what I want is a tree directed network graph.
Anyone know how I can adjust Gephi to make this?
Thanks!
I just found a solution.
I tested the file format as shown on the Yed site "import excel file" page
http://yed.yworks.com/support/manual/import_excel.html
This gave me the Yed import dialog (took a life time to figure out that it's a pop up menu and not selectable through the standard menu)
Anyway, it worked and I've adjusted the test files with the data prepared for the Gehpi. This was pretty easy, I could used the source target ID's etc. Just copy paste.
I load it into Yed and used some directed and radial clustering algorithms on it. Works fine!
Below you can find the excel node/edge file used to import in Yed and the graph file you can open with Yed to see the final radial result.
https://1drv.ms/f/s!AuVfRBdVHkO7hg6DExK_eVkm5_mR
Only thing to figure out is how to combine the weight (which represents the number of documents) with the node size.
Unfortunately, as of version 0.9.0, Gephi no longer supports hierarchical graphs. Maybe try using a previous version?
Other alternatives involve more complex software, such as Graphviz, but you need a .dot file instead of your .csv. I looked all over, but could not find an easy-to-use csv to dot converter.
You could try looking at d3-hierarchy, a node.js program, but then again you need to use the not-so-user-friendly npm. If you look at the link, it looks like it can produce the kind of diagram you're looking for.

When should I use poppler_page_render vs poppler_page_render_for_printing?

There are two functions to render a PopplerPage on a cairo surface: poppler_page_render and poppler_page_render_for_printing. The documentation states that the latter should be used "to render a page that will be printed".
My question is: which one of these should I use if my cairo surface will be later saved as a (pdf) file? Does saving as a file constitute a poppler "printing"? I would appreciate a reference to documentation.
Does it matter that the PopplerPage was created from a pdf file by poppler_document_get_page?
Looking at poppler's source code, the difference is, for example, that annotations are displayed, but not printed:
http://sources.debian.net/src/poppler/0.44.0-3/glib/poppler-page.cc/?hl=362#L362
http://sources.debian.net/src/poppler/0.44.0-3/glib/poppler-page.cc/?hl=309#L309

How to Convert IPicture to Image - .NET 4.5 TagLib Sharp

I am wanting to display the album artwork of a song (accessed via the taglib-sharp library) within a Windows Forms picture box. The problem I'm running into is that the taglib-library returns an image of type TagLib.IPicture whereas the picture box requires an object of type System.Drawing.Image.
I have scoured the internet for many hours now, looking for a way to convert from an IPicture to Image, but to no avail. The best lead I have is this: http://msdn.microsoft.com/en-us/library/system.windows.forms.axhost.getpicturefromipicture.aspx, but I have yet to see a successful example of how to implement this.
Any help as to how to convert between these two types would be much appreciated. Note: IPicture is not analogous to IPictureDisp in this case.
I've done the opposite before - turning an existing .jpg into an IPicture for embedding in an .mp3 file. I just tried reversing that operation and, after tweaking and testing, came up with this:
TagLib.File tagFile = TagLib.File.Create(mp3FilePath);
MemoryStream ms = new MemoryStream(tagFile.Tag.Pictures[0].Data.Data);
System.Drawing.Image image = System.Drawing.Image.FromStream(ms);
Thanks for the question - I already know how I'm going to use this myself!
Update: Here's the other way (.jpg to IPicture that I've done before):
tagFile.Tag.Pictures = new TagLib.IPicture[]
{
new TagLib.Picture(new TagLib.ByteVector((byte[])new System.Drawing.ImageConverter().ConvertTo(System.Drawing.Image.FromFile(jpgFilePath), typeof(byte[]))))
};

How to create new demon.model in openGLES?

I want to create a rotating object with 3d effect , I am using the sample project iPhoneGLEssentials provided by developer.apple.com. In the sample project demon.model file is used , I need to create my own .model file. Can any one help me how to create the required .model file?
You can see from the source for that demo that's not a common format. It just has the arrays for positions, normals, texcoords and element indices. You can see how it is read from the .model file in the moduleUtil.h. You can search online for libraries that can load specific formats for models. Engines like irrlicht has support for many formats such as .3ds, and .x. You can start from checking there.