如何在java中获取tga文件的方向 [英] how to get the direction of tga file in java

查看:144
本文介绍了如何在java中获取tga文件的方向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已阅读Wiki http://en.wikipedia.org/wiki/Truevision_TGA 和我知道tga文件的第十八个字节的5-4位代表tga文件的方向。

I have read Wiki http://en.wikipedia.org/wiki/Truevision_TGA and I know that the 5-4 bits of the Eighteenth byte of tga file represent the direction of tga file.

那么,有4个排列(00,01,10,11)向我们展示方向,每个排列代表哪个方向?

So, there is 4 permutations(00,01,10,11) to show us the direction, which direction does each permutation stand for?

推荐答案

来自PDF TruevisionTGAª - 文件格式规范 - 版本2.0 链接在维基百科页面上。

From the PDF Truevision TGAª — FILE FORMAT SPECIFICATION — Version 2.0 linked on the Wikipedia page.


比特5& 4:这些位用于指示
像素数据从文件传输到屏幕的顺序。
第4位用于从左到右排序,第5位用于
从上到下排序,如下所示。

Bits 5 & 4: These bits are used to indicate the order in which pixel data is transferred from the file to the screen. Bit 4 is for left-to-right ordering and bit 5 is for top-to-bottom ordering as shown below.

这篇关于如何在java中获取tga文件的方向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆