TCAX 字幕特效制作工具官方论坛 | ASS | TCAS | Python | Aegisub | Lua

 找回密码
 新人加入
查看: 3316|回复: 1
打印 上一主题 下一主题

[已解决] tcas_main function! [复制链接]

Administrator

TCAX Dev.

Rank: 7Rank: 7Rank: 7

楼主
发表于 2014-4-20 16:37:40 |显示全部楼层
Alex 发表于 2014-4-11 23:26
How can I do that?


if you just want to translate the image from one position to another without modifying the content,

use key framing tech.

see below,

## Append a pair of key frame PIXs to the TCAS_BUF list.
# @param TCAS_BUF a list, the list containing the raw TCAS FX data chunks
# @param pix_start a PIX, the target start key frame PIX that is going to be added into the TCAS_BUF
# @param pix_end a PIX, the target end key frame PIX that is going to be added into the TCAS_BUF
# @param start an integer, the starting time of the PIX
# @param end an integer, the end time of the PIX
# @param offsetX a float, offset of the PIX in the horizontal direction
# @param offsetY a float, offset of the PIX in the vertical direction
# @param type an integer, type of the key frame PIX, 1 - normal, 2 - use bilinear filtering to make smooth motion
# @param layer an integer, layer of the PIX
# @return 0 on success
def tcas_keyframe(TCAS_BUF, pix_start, pix_end, start, end, offsetX, offsetY, type, layer):



sorry for the late reply

Administrator

TCAX Dev.

Rank: 7Rank: 7Rank: 7

沙发
发表于 2014-4-20 21:13:31 |显示全部楼层
Alex 发表于 2014-4-20 17:44
I know that I have to use tcas_keyframe
but there is only one offsetX, offsetY!
because of that I pu ...

the point lies in the PIX structure

PIX = ((x, y), (width, height), (r, g, b, a, r, g, b, a, ....))

so pix_start can be ((x_src, y_src), (width, height), (r, g, b, a, r, g, b, a, ....))

pix_end can be ((x_dest, y_dest), (width, height), (r, g, b, a, r, g, b, a, ....))
您需要登录后才可以回帖 登录 | 新人加入

GitHub|TCAX 主页

GMT+8, 2024-5-5 04:56

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部
RealH