metadata

How to add custom EXIF tags to a image

一世执手 提交于 2019-12-05 08:40:11
I'd like to add a new tag ("LV95_original") to an image ( JPG, PNG or something else..) How can I add a custom EXIF tag to a image? This is what I've tried so far: using (var file = Image.FromFile(path)) { PropertyItem propItem = file.PropertyItems[0]; propItem.Type = 2; propItem.Value = System.Text.Encoding.UTF8.GetBytes(item.ToString() + "\0"); propItem.Len = propItem.Value.Length; file.SetPropertyItem(propItem); } This is what I've researched: Add custom attributes : This uses something different SetPropert : This updates a property, I need to add a new one Add EXIF info : This updates

Schema.org openingHours w/ multiple times & days that are closed

我只是一个虾纸丫 提交于 2019-12-05 08:14:51
I've looked at the Schema.org spec for opening hours, but it seems to fail to address two key items: 1) Localbusinesses that have multiple hours (ie 8-12, 1-5 with the hole in the middle being closed for lunch) 2) Days where the business is closed altogether. I can't find any examples of anyone else doing it on google, this is my code for just normal hours (9-5) and my GUESS for how to handle days that are closed. Can someone chime in on multiple hours and confirm my handling of closed days is correct? <time itemprop="openingHours" datetime="Mo 08:30-12:00"> <div style="font-weight:bold;width

How can I find out all audio files whose formats are supported by AVAudioPlayer in Lion 10.7?

江枫思渺然 提交于 2019-12-05 08:05:18
问题 I want to use codes like this. NSMetadataQuery *query = [[NSMetadataQuery alloc] init]; [query setSearchScopes: [NSArray arrayWithObject: [NSURL fileURLWithPath:@"/Users/Someone/Music" isDirectory:YES]]]; [query setPredicate: predicate]; ... ... Now how do I suppose to set "predicate" to filter out those files with unsupported format?? kMDItemCodezs,kMDItemMediaTypes,kMDItemContentType,kMDItemKind? Which one should I use? And what are all the possible values of these attibutes corresponding

Get Video file metadata in Java

夙愿已清 提交于 2019-12-05 07:52:09
问题 I have been trying to find a way to get the metadata out of video files such as frame rate, length, codec, aspect ratio. What java libraries are out there that would be good for this? 回答1: You can use VLCJ (GPL license) VLCJ wraps around libVLC DLL library (the library used in VLC) via JNA for Java app. It supports reading the metadata from a media file via MediaPlayer.getMediaMeta() Take note: certain versions of VLCJ don't work in full functionality with certain versions of libVLC. For

Which image formats contain meta data, and how can I clear it in PHP?

南楼画角 提交于 2019-12-05 07:08:08
Privacy concerns have lead me to believe I should scrub user uploaded images for any meta data. I know that JPEG have EXIF , but I'm not sure about PNG or GIF (both are able to be uploaded to my site from the public). Do these formats have meta data too, and how is it stored? What is the best way to remove it? I'm using PHP 5.29. Thanks The easiest way is to copy them to a new image with GD - you keep all the image info, but get rid of the metadata. You may try http://www.php.net/manual/en/imagick.stripimage.php $f = '16262403.jpg'; $i = new Imagick($f); $p = $i->getImageProperties(); var_dump

Easy way to store metadata about SQLite Database

半城伤御伤魂 提交于 2019-12-05 05:08:29
I was wondering if there is a simple way to store meta information about an sqlite-Database in that database. I am specifically thinking about a version number that lets you easily find out which version of a database layout you are using (So my code could check if the database structure is compatible without querying SELECT sql FROM sqlite_master WHERE type='table'; and comparing the result with a predefined schematic). To clarify: I am not interested in the version number of the sqlite software, but something akin to pythons __version__ variable that can be defined seperately for each python

Sort list based on data attribute (using jquery metadata plugin)

微笑、不失礼 提交于 2019-12-05 04:14:06
I'm having a tough time figuring out how to go about sorting a list based on one of the key/value pairs in the data attribute. <ul> <li data="{name:'Foo', number: '1'}"> <h3>Foo</h3> </li> <li data="{name:'Bar', number: '2'}"> <h3>Bar</h3> </li> </ul> Here's the jQuery. I'm setting the metadata attr and accessing it. All of this works fine. jQuery.metadata.setType("attr", "data"); $(document).ready(function(){ // loop through each list item and get the metadata $('ul li').each(function () { console.log($(this).metadata()); // shows the following - Object {name="Foo", number="1"} }); )};

What file sytems support Java UserDefinedFileAttributeView?

落花浮王杯 提交于 2019-12-05 02:50:36
I need to store custom data with a file in file system (about 50 bytes with each file). I do not have any other storage to keep the data and can not create an extra file for this. These are my requirements I can not change it. I have found that this can be done using UserDefinedFileAttributeView class. What file systems support this feature? NTFS, FAT, any other file systems on Linux? Where the data is actually stored and how reliable is it? I have tested that custom attributes are supported by following file systems via UserDefinedFileAttributeView: NTFS, Ext4, ZFS. Other popular file systems

How do I append metadata to an image in Matlab?

断了今生、忘了曾经 提交于 2019-12-05 02:36:53
In writing some image processing routines in Matlab, I found that I don't know how to write metadata in to a newly processed and saved image. To keep it simple, my flow is as follows: image = imread('Base_Pic.jpg'); image_info = imfinfo('Base_Pic.jpg'); %Process image... %Update metadata... imwrite(image,'Updated_Image.jpg','JPEG','Quality',100); I basically want the newly processed image to have all the same metadata attributes as the original image, with a few fields updated of course. How can I append the image_info structure to the newly saved JPEG ? You have a (very) limited ability to do

tm loses the metadata when applying tm_map

回眸只為那壹抹淺笑 提交于 2019-12-05 02:24:35
问题 I have a (small) problem with the tm r library. say I have a corpus: # boilerplate bcorp <- c("one","two","three","four","five") myCorpus <- Corpus(VectorSource(bcorp), list(lanuage = "en_US")) tdm <- TermDocumentMatrix(myCorpus) Docs(tdm) Result: [1] "1" "2" "3" "4" "5" This works. But when I try to use a transformation tm_map(): # this does not work myCorpus <- Corpus(VectorSource(bcorp), list(lanuage = "en_US")) myCorpus <- tm_map(myCorpus, tolower) tdm <- TermDocumentMatrix(myCorpus)