{"action":"created","issue":{"url":"https://api.github.com/repos/SteamDatabase/ValveResourceFormat/issues/29","labels_url":"https://api.github.com/repos/SteamDatabase/ValveResourceFormat/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/SteamDatabase/ValveResourceFormat/issues/29/comments","events_url":"https://api.github.com/repos/SteamDatabase/ValveResourceFormat/issues/29/events","html_url":"https://github.com/SteamDatabase/ValveResourceFormat/issues/29","id":119319958,"number":29,"title":"vtex_c files which contain TGA compressed with DXT5 have incorrect colors when decompressed","user":{"login":"babelshift","id":2723423,"avatar_url":"https://avatars.githubusercontent.com/u/2723423?v=3","gravatar_id":"","url":"https://api.github.com/users/babelshift","html_url":"https://github.com/babelshift","followers_url":"https://api.github.com/users/babelshift/followers","following_url":"https://api.github.com/users/babelshift/following{/other_user}","gists_url":"https://api.github.com/users/babelshift/gists{/gist_id}","starred_url":"https://api.github.com/users/babelshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/babelshift/subscriptions","organizations_url":"https://api.github.com/users/babelshift/orgs","repos_url":"https://api.github.com/users/babelshift/repos","events_url":"https://api.github.com/users/babelshift/events{/privacy}","received_events_url":"https://api.github.com/users/babelshift/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/SteamDatabase/ValveResourceFormat/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/SteamDatabase/ValveResourceFormat/milestones/1","html_url":"https://github.com/SteamDatabase/ValveResourceFormat/milestones/0.0.2","labels_url":"https://api.github.com/repos/SteamDatabase/ValveResourceFormat/milestones/1/labels","id":1436134,"number":1,"title":"0.0.2","description":"Current changelog:\r\n\r\n## Library\r\n- Read panorama name entries into a list\r\n- Read SmallData (preload bytes) in VPKs\r\n- Fixed multiple cases when calculations could underflow\r\n- Fixed reading pixel data in `RGBA8888` texture format\r\n- Fixed colour issues in textures that use DXT5 compression *(converted YCgCo to RGBA)*\r\n- Partial support for texture formats 17, 18, 19\r\n- Initial work on parsing particles\r\n\r\n## Decompiler\r\n- Added an option to print vpk contents, use `--vpk_dir` option\r\n- Log exceptions to a file for easier debugging\r\n\r\n## GUI\r\n- Open non resource files in explorer on double click\r\n- Black background colour when viewing textures\r\n- Embedded asset type images\r\n","creator":{"login":"xPaw","id":613331,"avatar_url":"https://avatars.githubusercontent.com/u/613331?v=3","gravatar_id":"","url":"https://api.github.com/users/xPaw","html_url":"https://github.com/xPaw","followers_url":"https://api.github.com/users/xPaw/followers","following_url":"https://api.github.com/users/xPaw/following{/other_user}","gists_url":"https://api.github.com/users/xPaw/gists{/gist_id}","starred_url":"https://api.github.com/users/xPaw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xPaw/subscriptions","organizations_url":"https://api.github.com/users/xPaw/orgs","repos_url":"https://api.github.com/users/xPaw/repos","events_url":"https://api.github.com/users/xPaw/events{/privacy}","received_events_url":"https://api.github.com/users/xPaw/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":11,"state":"open","created_at":"2015-11-30T21:26:29Z","updated_at":"2015-12-01T18:34:08Z","due_on":null,"closed_at":null},"comments":15,"created_at":"2015-11-28T21:53:02Z","updated_at":"2015-12-02T03:05:21Z","closed_at":null,"body":"After some testing and research, I've found that the vtex_c files which are incorrectly colored on extraction are TGA files compressed with DXT5 and possibly in YCoCg colorspace.\r\n\r\nLooking at the REDI tab reveals:\r\n\r\nCResourceString m_String = \"Texture Compiler Version Image YCoCg Conversion\"\r\n\r\nThis is a bit out of my league. I'm not sure if Valve's texture compiler is converting to YCoCg colorspace prior to compression. Maybe that means it needs to be read out as YCoCg and converted to RGB during decompression?\r\n\r\nGithub doesn't support attaching vtex_c, but here's a test file that you can see. https://drive.google.com/file/d/0B7o2acNuwX44X01LZnVUeFZfX2c/view?usp=sharing\r\n\r\nAttached to this issue is the results of decompressing the file linked above.\r\n![loadingscreen_tga](https://cloud.githubusercontent.com/assets/2723423/11454121/7978eb00-95f0-11e5-831e-e69ad2013569.png)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/SteamDatabase/ValveResourceFormat/issues/comments/161165380","html_url":"https://github.com/SteamDatabase/ValveResourceFormat/issues/29#issuecomment-161165380","issue_url":"https://api.github.com/repos/SteamDatabase/ValveResourceFormat/issues/29","id":161165380,"user":{"login":"SinZ163","id":767456,"avatar_url":"https://avatars.githubusercontent.com/u/767456?v=3","gravatar_id":"","url":"https://api.github.com/users/SinZ163","html_url":"https://github.com/SinZ163","followers_url":"https://api.github.com/users/SinZ163/followers","following_url":"https://api.github.com/users/SinZ163/following{/other_user}","gists_url":"https://api.github.com/users/SinZ163/gists{/gist_id}","starred_url":"https://api.github.com/users/SinZ163/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SinZ163/subscriptions","organizations_url":"https://api.github.com/users/SinZ163/orgs","repos_url":"https://api.github.com/users/SinZ163/repos","events_url":"https://api.github.com/users/SinZ163/events{/privacy}","received_events_url":"https://api.github.com/users/SinZ163/received_events","type":"User","site_admin":false},"created_at":"2015-12-02T03:05:21Z","updated_at":"2015-12-02T03:05:21Z","body":"is ingame ![](http://i.imgur.com/BhJx8b0.jpg)\r\nis ValveResourceViewer before @xPaw's diff ![](http://i.imgur.com/2gF9vhP.png)\r\n\r\nUsing @xPaw's diff \r\n\r\nis ValveResourceViewer respecting Alpha![](http://i.imgur.com/p7OD91y.png) \r\nis ValveResourceViewer with alpha hardcoded to `0xFF`![](http://i.imgur.com/JezcztS.jpg) "}}