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

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

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

Rank: 4

跳转到指定楼层
楼主
发表于 2014-4-11 21:16:41 |只看该作者 |倒序浏览
Hi

I have Q regarding tcas_main function

If i'm going to use image can i use move tag?
I want to move image like from x-20 to x+20
but I thought we can't move image in this case when u using  tcas_main(TCAS_BUF. right?


example this fx "http://www.tcax.org/forum.php?mod=viewthread&tid=158"
for SAi, the images have one position  only!

Rank: 4

沙发
发表于 2014-4-11 21:25:53 |只看该作者
you can use frame by frame(or just define you minimum stride yourself) pos to make it.

Rank: 4

板凳
发表于 2014-4-11 23:26:35 |只看该作者
How can I do that?

Rank: 4

地板
发表于 2014-4-12 07:08:34 |只看该作者
Alex 发表于 2014-4-11 23:26
How can I do that?

see nyuFx  docs utils.frames

you can implement one by yourself

Rank: 4

5#
发表于 2014-4-13 01:20:32 |只看该作者
thanx

Administrator

TCAX Dev.

Rank: 7Rank: 7Rank: 7

6#
发表于 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

Rank: 4

7#
发表于 2014-4-20 17:44:16 |只看该作者
I know that I have to use tcas_keyframe
but there is only one offsetX, offsetY!
because of that I put this question

and I have other question, it's in this topic (last comment)
http://www.tcax.org/forum.php?mo ... &extra=page%3D2

Administrator

TCAX Dev.

Rank: 7Rank: 7Rank: 7

8#
发表于 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, ....))

Rank: 4

9#
发表于 2014-4-20 21:28:42 |只看该作者
It's clear now. Shishime ^^
您需要登录后才可以回帖 登录 | 新人加入

GitHub|TCAX 主页

GMT+8, 2024-11-22 07:14

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部
RealH