vttThumbMakermain.tsx23 matches
35<h1>Thumbnail Maker</h1>
36<div id="dropZone">
37<p>π· Drag & drop images here or click to select</p>
38<input type="file" id="fileInput" multiple accept="image/*">
39</div>
40<div id="thumbnailOptions">
59Output Format:
60<select id="outputFormat">
61<option value="image/png">PNG</option>
62<option value="image/jpeg">JPEG</option>
63<option value="image/webp">WebP</option>
64</select>
65</label><br>
76<button id="downloadMetadataBtn">Download Metadata</button>
77</div>
78<div id="imagePreview"></div>
79</div>
80</body>
140select {
141appearance: none;
142background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z' fill='%23333'/%3E%3C/svg%3E");
143background-repeat: no-repeat;
144background-position: right 10px center;
206}
207208#imagePreview {
209margin-top: 20px;
210text-align: center;
211}
212213#imagePreview img {
214max-width: 100%;
215height: auto;
233const keepAspectRatio = document.getElementById('keepAspectRatio');
234const thumbWidth = document.getElementById('thumbWidth');
235const imagePreview = document.getElementById('imagePreview');
236const thumbnailOptions = document.getElementById('thumbnailOptions');
237const renderOptions = document.getElementById('renderOptions');
251renderOptions.style.display = 'none';
252downloadSection.style.display = 'none';
253imagePreview.innerHTML = '';
254thumbnailCanvas = null;
255thumbnailMetadata = null;
276event.preventDefault();
277dropZone.classList.remove('drag-over');
278files = Array.from(event.dataTransfer.files).filter(file => file.type.startsWith('image/'));
279resetToStep1();
280});
291progressBar.value = 0;
292293const image0 = await getImage(files[0]);
294const cols = Math.ceil(Math.sqrt(files.length));
295const rows = Math.ceil(files.length / cols);
296const tHeight = parseInt(thumbHeight.value);
297let tWidth = keepAspectRatio.checked
298? Math.floor(tHeight / image0.height * image0.width)
299: parseInt(thumbWidth.value);
300302const canvasHeight = rows * tHeight;
303304image0.revoke();
305306thumbnailCanvas = new OffscreenCanvas(canvasWidth, canvasHeight);
312const row = Math.floor(i / cols);
313314const img = await getImage(file);
315ctx.drawImage(img, col * tWidth, row * tHeight, tWidth, tHeight);
316img.revoke();
317345const blob = await thumbnailCanvas.convertToBlob({
346type: outputFormat.value,
347quality: outputFormat.value !== 'image/png' ? parseFloat(outputQuality.value) : undefined
348});
349353downloadSection.style.display = 'flex';
354355// Display the generated image
356const img = document.createElement('img');
357img.src = url;
358imagePreview.innerHTML = '';
359imagePreview.appendChild(img);
360361progressBar.style.display = 'none';
377});
378379function getImage(file) {
380return new Promise((resolve) => {
381const url = URL.createObjectURL(file);
382const img = new Image();
383img.revoke = () => URL.revokeObjectURL(url);
384img.onload = () => resolve(img);
altairClientREADME.md1 match
23<div align="center">
4<img src="https://imagedelivery.net/iHX6Ovru0O7AjmyT5yZRoA/b1963886-2c4e-4aac-34ec-4c0a50539a00/public" />
5</div>
6
getProfileProfilePagemain.tsx7 matches
9name: string;
10description: string;
11image: {
12url: string;
13ipfs_cid: string;
14};
15backgroundImage: {
16url: string;
17ipfs_cid: string;
22const fallbackUrl = "https://ipfs.near.social/ipfs/bafkreibmiy4ozblcgv3fm3gc6q62s55em33vconbavfd2ekkuliznaq3zm";
2324const getImageUrl = (image?: { url?: string; ipfs_cid?: string }) => {
25if (image?.url) return image.url;
26if (image?.ipfs_cid) return `https://ipfs.near.social/ipfs/${image.ipfs_cid}`;
27return fallbackUrl;
28};
122<div
123className="min-h-screen w-full bg-cover bg-center flex flex-col justify-center items-center py-16 margin-auto relative"
124style={{ backgroundImage: loading ? "none" : `url(${getImageUrl(profile?.backgroundImage) || ""})` }}
125>
126<div className="bg-white bg-opacity-95 p-8 rounded-xl shadow-2xl text-center max-w-2xl w-full lg:max-w-[1024px] w-full z-10 backdrop-blur-sm">
129{showBirthdayBanner && <BirthdayBanner name={profile?.name ?? accountId} />}
130<img
131src={getImageUrl(profile?.image)}
132alt={profile?.name}
133className="w-32 h-32 rounded-full object-cover mx-auto mb-4 shadow-lg"
blob_adminREADME.md1 match
3This is a lightweight Blob Admin interface to view and debug your Blob data.
45
67## Installation
falDemoAppmain.tsx14 matches
7function App() {
8const [prompt, setPrompt] = useState("");
9const [imageUrl, setImageUrl] = useState("");
10const [loading, setLoading] = useState(false);
1112const generateImage = async (e?: React.FormEvent) => {
13e?.preventDefault();
14setLoading(true);
21input: {
22prompt,
23image_size: "landscape_4_3",
24num_inference_steps: 4,
25num_images: 1,
26enable_safety_checker: true,
27sync_mode: true,
28},
29});
30setImageUrl(result.data.images[0].url);
31} catch (error) {
32console.error("Error generating image:", error);
33} finally {
34setLoading(false);
39<div className="min-h-screen bg-black text-white py-12 px-4 sm:px-6 lg:px-8">
40<div className="max-w-3xl mx-auto">
41<h1 className="text-4xl font-bold text-center mb-8">Fal AI Image Generator</h1>
42<div className="bg-gray-900 rounded-lg p-6 mb-8 shadow-lg">
43<form className="flex flex-col sm:flex-row gap-4" onSubmit={generateImage}>
44<input
45type="text"
46value={prompt}
47onChange={(e) => setPrompt(e.target.value)}
48placeholder="Enter your image prompt"
49className="flex-grow px-4 py-2 bg-gray-800 border border-gray-700 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-transparent"
50/>
51<button
52onClick={generateImage}
53disabled={loading || !prompt}
54className={`px-6 py-2 rounded-md text-white font-medium transition-colors duration-200 ${
80)
81: (
82"Generate Image"
83)}
84</button>
85</form>
86</div>
87{imageUrl && (
88<div className="bg-gray-900 rounded-lg overflow-hidden shadow-lg">
89<img src={imageUrl} alt="Generated image" className="w-full h-auto" />
90</div>
91)}
118<meta charset="UTF-8">
119<meta name="viewport" content="width=device-width, initial-scale=1.0">
120<title>Fal AI Image Generator</title>
121<script src="https://cdn.tailwindcss.com"></script>
122<style>
elegantJadeParrotfishmain.tsx4 matches
18const questions = $("[class*='question_content_']");
19const htmlContent = questions.html();
20const images = questions.find("img");
2122for (const image of images.toArray()) {
23const src = $(image).attr("src"); // Use Cheerio to get the src attribute
2425// Check if src contains any of the specified strings
2930// Update the src attribute
31$(image).attr("src", `https://archive.cool.com/images/${encodeURIComponent(src)}`);
32}
33
falDemoAppmain.tsx14 matches
7function App() {
8const [prompt, setPrompt] = useState("");
9const [imageUrl, setImageUrl] = useState("");
10const [loading, setLoading] = useState(false);
1112const generateImage = async (e?: React.FormEvent) => {
13e?.preventDefault();
14setLoading(true);
21input: {
22prompt,
23image_size: "landscape_4_3",
24num_inference_steps: 4,
25num_images: 1,
26enable_safety_checker: true,
27sync_mode: true,
28},
29});
30setImageUrl(result.data.images[0].url);
31} catch (error) {
32console.error("Error generating image:", error);
33} finally {
34setLoading(false);
39<div className="min-h-screen bg-black text-white py-12 px-4 sm:px-6 lg:px-8">
40<div className="max-w-3xl mx-auto">
41<h1 className="text-4xl font-bold text-center mb-8">Fal AI Image Generator</h1>
42<div className="bg-gray-900 rounded-lg p-6 mb-8 shadow-lg">
43<form className="flex flex-col sm:flex-row gap-4" onSubmit={generateImage}>
44<input
45type="text"
46value={prompt}
47onChange={(e) => setPrompt(e.target.value)}
48placeholder="Enter your image prompt"
49className="flex-grow px-4 py-2 bg-gray-800 border border-gray-700 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-transparent"
50/>
51<button
52onClick={generateImage}
53disabled={loading || !prompt}
54className={`px-6 py-2 rounded-md text-white font-medium transition-colors duration-200 ${
80)
81: (
82"Generate Image"
83)}
84</button>
85</form>
86</div>
87{imageUrl && (
88<div className="bg-gray-900 rounded-lg overflow-hidden shadow-lg">
89<img src={imageUrl} alt="Generated image" className="w-full h-auto" />
90</div>
91)}
118<meta charset="UTF-8">
119<meta name="viewport" content="width=device-width, initial-scale=1.0">
120<title>Fal AI Image Generator</title>
121<script src="https://cdn.tailwindcss.com"></script>
122<style>
FedifyOnValTownmain.tsx3 matches
7Follow,
8generateCryptoKeyPair,
9Image,
10importJwk,
11LanguageString,
55assertionMethods: keyPairs.map(pair => pair.multikey),
56url: new URL("/", ctx.url),
57icon: new Image({
58mediaType: "image/png",
59url: new URL("https://fedify.dev/logo.png"),
60}),
blob_adminREADME.md1 match
3This is a lightweight Blob Admin interface to view and debug your Blob data.
45
67## Installation
crossmintSolanaTxGeneratormain.tsx3 matches
47<div className="header">
48<h1>Solana Transaction Code Generator</h1>
49<img src="https://i.postimg.cc/SQV1FgkV/manlet.jpg" alt="Solana Meme" className="meme-image" />
50</div>
51<form onSubmit={handleSubmit}>
190padding: 0;
191background-color: var(--solana-black);
192background-image: linear-gradient(45deg, #14F195 25%, #9945FF 25%, #9945FF 50%, #14F195 50%, #14F195 75%, #9945FF 75%, #9945FF 100%);
193background-size: 56.57px 56.57px;
194min-height: 100vh;
218}
219220.meme-image {
221width: 100px;
222height: 100px;