MCPcopy Create free account
hub / github.com/32comic/image2pixel-web / displayOriginalImage

Method displayOriginalImage

pixelizer.js:208–221  ·  view source on GitHub ↗
(img)

Source from the content-addressed store, hash-verified

206 }
207
208 displayOriginalImage(img) {
209 const originalPreview = document.getElementById('originalPreview');
210 if (originalPreview) {
211 originalPreview.src = img.src;
212
213 // 确保图片样式与处理结果一致
214 originalPreview.style.maxWidth = '100%';
215 originalPreview.style.maxHeight = '100%';
216 originalPreview.style.imageRendering = 'pixelated';
217 originalPreview.style.objectFit = 'contain';
218 originalPreview.style.width = 'auto';
219 originalPreview.style.height = 'auto';
220 }
221 }
222
223 /**
224 * 自动检测像素块大小并给出建议

Callers 1

loadImageMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected