Re: change the canvas size without changing the image size?
Posted: Tue Jun 01, 2021 8:23 pm
Everything in Moho, like stroke width, etc., is relative to the project height. So changing the project height normalizes everything to that new dimension. This isn't a bug, because you generally want the same image size, stroke weight, etc. if you export the same project to standard (4:3) or widescreen (16:9). If those things were altered by project width, the result would not be consistent when exported for different horizontal aspect ratios.
You can solve your problem by either following my above steps or using this menu script on all selected image layers:
You can solve your problem by either following my above steps or using this menu script on all selected image layers:
Code: Select all
-- **************************************************
-- Provide Moho with the name of this script object
-- **************************************************
ScriptName = "Syn_NormalizeImages"
-- **************************************************
-- General information about this script
-- **************************************************
Syn_NormalizeImages = {}
function Syn_NormalizeImages:Name()
return "Normalize Images"
end
function Syn_NormalizeImages:Version()
return "1.0"
end
function Syn_NormalizeImages:Description()
return "Normalize selected images scaled by project dimension change"
end
function Syn_NormalizeImages:Creator()
return "(c)2021 J.Wesley Fowler (SynthSin75)"
end
function Syn_NormalizeImages:UILabel()
return "SYN: Normalize Images"
end
-- **************************************************
-- The guts of this script
-- **************************************************
function Syn_NormalizeImages:Run(moho)
moho.document:PrepUndo(moho.layer)
moho.document:SetDirty()
local count = 0
repeat
local layer = moho.document:LayerByAbsoluteID(count)
count = count+1
if (layer) then
if (layer:LayerType() == MOHO.LT_IMAGE) and (layer:SecondarySelection()) then
local source = moho:LayerAsImage(layer):SourceImage()
moho:LayerAsImage(layer):SetSourceImage(source)
end
end
until (not layer)
end