imgconvert: avoid mixed declarations and code.