Soft Sky SVG
Soft Sky SVG is a Scalable Vector Graphics sample generated for file format testing, 640 x 360. It can be used to test downloads, parsers, previews, and file type detection.
soft-sky.svgImage
XMLベースのベクター画像形式。テキストとして読め、ブラウザで直接表示できます。
3C 73 76 67 <svg3C 3F 78 6D 6C <?xmlSIGNATURE = bytes.fromhex("3c737667")
OFFSET = 0
def is_svg(path: str) -> bool:
with open(path, "rb") as f:
f.seek(OFFSET)
head = f.read(len(SIGNATURE))
return head == SIGNATUREconst SIGNATURE = [0x3c, 0x73, 0x76, 0x67];
const OFFSET = 0;
// bytes: a Uint8Array / Buffer holding the start of the file
export function isSvg(bytes) {
return SIGNATURE.every((byte, i) => bytes[OFFSET + i] === byte);
}package fileid
import "bytes"
var issvgSignature = []byte{0x3c, 0x73, 0x76, 0x67}
const issvgOffset = 0
func IsSvg(b []byte) bool {
end := issvgOffset + len(issvgSignature)
if len(b) < end {
return false
}
return bytes.Equal(b[issvgOffset:end], issvgSignature)
}const SIGNATURE: &[u8] = &[0x3c, 0x73, 0x76, 0x67];
const OFFSET: usize = 0;
fn is_svg(bytes: &[u8]) -> bool {
bytes.get(OFFSET..OFFSET + SIGNATURE.len()) == Some(SIGNATURE)
}<?php
$signature = "\x3c\x73\x76\x67";
$offset = 0;
function is_svg(string $bytes): bool {
global $signature, $offset;
return substr($bytes, $offset, strlen($signature)) === $signature;
}Scalable Vector Graphics は画像のプレビュー、サムネイル、メタデータ確認、アップロード検証などで広く使われます。解像度・アルファ・圧縮・ファイルサイズが実装の挙動に影響するため、複数のサイズでテストしてください。
メディアファイルも、壊れたメタデータ・極端な寸法・長い再生時間・異常なチャンクでデコーダに負荷をかけることがあります。処理前にサイズ・寸法・長さを読み取ってください。
11 個のサンプルで、極小画像・高解像度画像・アルファチャンネル・圧縮しにくいアセットをテストできます。
Soft Sky SVG is a Scalable Vector Graphics sample generated for file format testing, 640 x 360. It can be used to test downloads, parsers, previews, and file type detection.
soft-sky.svgBlue Sky SVG is a Scalable Vector Graphics sample based on Wikimedia Commons, 64 x 64. It can be used to test downloads, parsers, previews, and file type detection.
01-blue-sky.svgd354cdd8ca8a36f09a6b412b5b6f2603c69a09a95796e9065069a9a8e3e19c7dFlower Garden SVG is a Scalable Vector Graphics sample based on Wikimedia Commons, 128 x 72. It can be used to test downloads, parsers, previews, and file type detection.
02-flower-garden.svgc92ee56b9ed9ceb6c2f4ac18f838fe80d70b215d2ef062f4e0b7821c7b012ba8Navy Blue Sky SVG is a Scalable Vector Graphics sample based on Wikimedia Commons, 256 x 144. It can be used to test downloads, parsers, previews, and file type detection.
03-navy-blue-sky.svg6791490033e987b6e80fcc787fbb2cf76f5b871c9ec85da40401d9dbc1d72c3dNature of the Sky SVG is a Scalable Vector Graphics sample based on Wikimedia Commons, 360 x 640. It can be used to test downloads, parsers, previews, and file type detection.
04-nature-sky.svgc706c311f90100386a398190a5c87ff625da1d18fdfcebd12d1755f171b5c07dSky Landscape SVG is a Scalable Vector Graphics sample based on Wikimedia Commons, 640 x 360. It can be used to test downloads, parsers, previews, and file type detection.
05-sky-landscape.svg527425180e0137305b115b812658007ad012718772d3ceed6c4a6e1365801813Starry Sky SVG is a Scalable Vector Graphics sample based on Wikimedia Commons, 800 x 600. It can be used to test downloads, parsers, previews, and file type detection.
06-starry-sky.svgb9d8b6026d5115e46ef1131d7a8f5d6792208ef4d61302892c5ab7cb8f2ffb36Blue Night Sky SVG is a Scalable Vector Graphics sample based on Wikimedia Commons, 1024 x 768. It can be used to test downloads, parsers, previews, and file type detection.
07-blue-night-sky.svg747fea89e431864c83b5a614dd885ca38574ddbb03f9f9b84334dc8113c6a984Hibiscus Flower SVG is a Scalable Vector Graphics sample based on Wikimedia Commons, 1280 x 720. It can be used to test downloads, parsers, previews, and file type detection.
08-hibiscus-flower.svgc18770f0e9d692d815e99a89e6ab2f9beaaa3913847d1d5d60becbc677c56335Arctic Sky SVG is a Scalable Vector Graphics sample based on Wikimedia Commons, 1600 x 900. It can be used to test downloads, parsers, previews, and file type detection.
09-arctic-sky.svgccaca49cab5b5a22d4c4d581a2a38a88ca3ab561e44dde9cddaf4bf435375485NASA Blue Marble Metadata SVG is a Scalable Vector Graphics sample based on NASA Image and Video Library, 640 x 360. It can be used to test downloads, parsers, previews, and file type detection.
nasa-blue-marble-2012-east.svgee1de3cc3ccb1639c12b616324893b8a33a2f28aa1239b624fd45493f339c0b1Scalable Vector Graphics ファイルはバイトシグネチャ 3C 73 76 67 ("<svg") または 3C 3F 78 6D 6C ("<?xml") で始まります。拡張子に頼らず、この先頭バイトを読み取って形式を判定してください。
Scalable Vector Graphics のMIMEタイプは image/svg+xml です。
Scalable Vector Graphics ファイルは .svg 拡張子を使います。拡張子は慣習にすぎず中身を保証しないため、シグネチャや構造のチェックと組み合わせてください。