Where the autistic get artistic.
[Return]
Posting mode: Reply
Name
Email
Subject   (reply to 3657)
Message
BB Code
File
File URL
Embed   Help
Password  (for post and file deletion)
  • Supported file types are: FLV, GIF, JPEG, JPG, MP3, OGG, PDF, PNG, RAR, SWF, WEBM, ZIP
  • Maximum file size allowed is 25000 KB.
  • Images greater than 260x260 pixels will be thumbnailed.
  • Currently 1089 unique user posts.
  • board catalog

File 173352326434.jpg - (343.43KB , 1365x868 , 60bc0c71b475afc237057a6abfd151ea.jpg )
3657 No. 3657 [Edit]
https://gitgud.io/nvtelen/xmp_property_extension

Adding support for tags embedded in common image types, has been an interest of mine for a while.
>>/ot/40374
>>/navi/3354
>>/navi/3366

I've buckled down, and I'm gonna get it done. What I have so far, is a COM property handler, that wraps around the original intended for an image type. The class factory and reading data through the original property handler are implemented. Next, I will implement reading tag data.

I've gone with Rust because before this, I knew neither C++ nor Rust, and I'm more interested in the latter. On top of that, I think I can benefit from the safety net Rust provides. When looking at C++ COM code, there's a lot of raw pointer dereferencing and manually releasing memory. "Modern" C++ mitigates the dangers associated with the language, but I don't know if those features are compatible with COM. Even if they are, I would have to know the language well enough to map reference code to "modern" C++, and that seems like way too much of a learning curve compared to there only being one, good way of doing things.

For reading tags, the xmp_toolkit crate seems like the right tool for the job. Moving data from a COM interface to that crate's XmpMeta struct, isn't straightforward though. The two ideas I have are either somehow getting the full file path from the IStream interface, and passing that along, or writing the data to a temporary location, and passing the path to that along. I suspect the former is more performant. It would be nice if I could somehow pass the in-memory data IStream has access to, to xmp_toolkit, but I don't think that's possible. Any suggestions on this would be greatly appreciated.
Expand all images
>> No. 3658 [Edit]
File 173391356499.png - (504.49KB , 1512x575 , Capture.png )
3658
Update: It's pretty much finished. PNG and GIF files can now have their embedded tags indexed. What I'll do next is develop my tag scraper more. I also want that to work with MP4 files, which have their own tagging system that windows supports that natively.
>> No. 3659 [Edit]
File 173416080069.jpg - (813.14KB , 1073x1500 , b294750c8661406fdaabc3be8d5cfc05.jpg )
3659
Alright, what I have so far works with images perfectly well(minus the bugs I've been finding here and there)

https://gitgud.io/nvtelen/tag-injector
https://files.catbox.moe/xgq3cc.7z

I ended up writing this part in Rust. I wanted to remove the dependency on Exiftool and just have a self-contained executable. Wasn't possible with Go. I learned a lot though and the result has more polish.

Next I'll try adding MP4 support.

Post edited on 14th Dec 2024, 12:08am
>> No. 3660 [Edit]
File 17342192638.png - (19.12KB , 721x451 , 7e770a8e87f4bb221ab244d8d3ac692e98985f94403e7913ba.png )
3660
This could've been good in theory, but sadly we have to pass on this because it's written in NSAlang.
>> No. 3661 [Edit]
File 173422586320.jpg - (4.76MB , 2480x3508 , 124106269_p0.jpg )
3661
Yeah, I'm done with what I have now. The latest release on Gitlab will probably be the last unless I notice a bug. Error-handling has been cleaned up.

Unfortunately, I'm giving up on adding MP4 support. Microsoft decided to use a proprietary, undocumented standard for MPEG-4 tags. The only way to programmatically edit these, is through some .Net Windows Shell SDK that they don't even host a download for anymore.

What makes this even more frustrating is that iTunes already made a standard for MPEG-4 audio metadata, and there's very good library support for editing that. There's 0 reason it can't be used with video files too. Trying to use XMP data instead didn't really work when I tested it before, so I don't even want to get into that.

I'm beginning to see the advantages of Hydrus Network's approach. Shell integration with something like that would be great. Maybe through a "protocol handler"
https://learn.microsoft.com/en-us/windows/win32/search/-search-3x-wds-extidx-prot-implementing

I'm not sure it's worth investing even more into the Window's platform though. Maybe thinking about Linux would be a more fruitful venture, since everything is well-documented there.

>>3660
C and C++ are the NSA's favorite languages. They have it to thank for countless exploits and 0-days. At the end of the day, the ecosystem is the most important thing about a language and Rust was the only language that fits this purpose besides C++, which I think would be a huge pain in the ass in comparison.

View catalog

Delete post []
Password  
Report post
Reason  


[Home] [Manage]



[ Rules ] [ an / foe / ma / mp3 / vg / vn ] [ cr / fig / navi ] [ mai / ot / so / tat ] [ arc / ddl / irc / lol / ns / pic ] [ home ]