Image 为什么将图像文本设置为paintCompression为rle的图像文本会导致空白图像?

Image 为什么将图像文本设置为paintCompression为rle的图像文本会导致空白图像?,image,livecode,Image,Livecode,图像的文本似乎未被修改。一个简单的测试就是从图像库中获取Mac Classic问题图标,然后选择它并: set the text of the selObj to the text of the selObj 您应该得到一个看似空白的图像,但以下内容是正确的: put the text of the selObj into tText set the text of the selObj to tText -- image is now blank put tText is the text

图像的文本似乎未被修改。一个简单的测试就是从图像库中获取Mac Classic问题图标,然后选择它并:

set the text of the selObj to the text of the selObj
您应该得到一个看似空白的图像,但以下内容是正确的:

put the text of the selObj into tText
set the text of the selObj to tText
-- image is now blank
put tText is the text of the selObj
-- true

有什么想法吗?

正在讨论的图像是以“rle”格式编码的,这是在添加对png、gif和jpeg的支持之前图像存储的原始格式。不幸的是,目前此类图像的文本属性无法往返


要解决此问题,您可以使用export命令将图像数据导出为PNG/GIF格式,并改用该格式。

所讨论的图像以“rle”格式编码,该格式是在添加对PNG、GIF和jpeg的支持之前存储的原始格式。不幸的是,目前此类图像的文本属性无法往返

要解决此问题,您可以使用export命令将图像数据导出为PNG/GIF格式,并使用它。

另一种方法(除了转换为PNG或其他格式)是不使用文本,而是使用图像数据。请注意,您需要将每个处理过的图像的宽度和高度设置为相同的值,因为imagedata取决于屏幕上显示的内容,而不是实际存储的“真实”图像

例如:

set the width of image 2 to the width of image 1
set the height of image 2 to the height of image 1
set the imagedata of image 2 to the imagedata of image 1
以这种方式填充数据的图像在其文本方面不会表现出奇怪的行为。因此,您可以使用它来转换行为不正常的图像:

set the width of image 1 to the formattedwidth of image 1
set the height of image 1 to the formattedheight of image 1
set the imagedata of image 1 to the imagedata of image 1
最后一点,这听起来像是我不想要的行为,你有没有提交错误?

另一种方法(除了转换为png或其他格式)是不使用文本,而是使用imagedata。请注意,您需要将每个处理过的图像的宽度和高度设置为相同的值,因为imagedata取决于屏幕上显示的内容,而不是实际存储的“真实”图像

例如:

set the width of image 2 to the width of image 1
set the height of image 2 to the height of image 1
set the imagedata of image 2 to the imagedata of image 1
以这种方式填充数据的图像在其文本方面不会表现出奇怪的行为。因此,您可以使用它来转换行为不正常的图像:

set the width of image 1 to the formattedwidth of image 1
set the height of image 1 to the formattedheight of image 1
set the imagedata of image 1 to the imagedata of image 1

最后一点,这听起来像是我不想要的行为,你提交了错误吗?

谢谢Mark,我想这些天不会太常见,但我会按照你在lcVCSThanks Mark中的建议去做,我想这些天不会太常见,但我会按照你在lcVCSThanks BvG中的建议去做。不,我还没有提交bug。我可能很乐意将rle记录为不推荐的,您不能将文本设置为rle数据,也不能在运行时引擎中将png设置为默认值。前几天,当我黑了一个快速截图来测试一个新的外部引擎时,我发现rle是iOS引擎的默认版本…谢谢BvG。不,我还没有提交bug。我可能很乐意将rle记录为不推荐的,您不能将文本设置为rle数据,也不能在运行时引擎中将png设置为默认值。前几天,当我黑了一个快速截图来测试一个新的外部引擎时,我发现rle是iOS引擎的默认版本。。。