Hi,
issue with GetMediaItemImageResource
it returns 0 if there is no image. it should return the stretch status of the text.

for i = 0, reaper.CountSelectedMediaItems(0, 0 ) - 1 do
local item = reaper.GetSelectedMediaItem(0, i)
retval, image, imageflags = reaper.BR_GetMediaItemImageResource( item ) -- ISSUE HERE
reaper.BR_SetMediaItemImageResource(item, "", 3)
end
this will always return 0, even if run multiple times and that the text items stretching has changed
I tried to take a look at the code but it is not a language I'm used too :S