Val Town Code SearchReturn to Val Town

API Access

You can access search results via JSON API by adding format=json to your query:

https://codesearch.val.run/?q=image&page=316&format=json

For typeahead suggestions, use the /typeahead endpoint:

https://codesearch.val.run/typeahead?q=image

Returns an array of strings in format "username" or "username/projectName"

Found 10953 results for "image"(7145ms)

pdfindex.ts2 matches

@pro562Updated 1 month ago
31app.route("/api/merge", mergeRoute);
32app.route("/api/split", splitRoute);
33app.route("/api/pdf-to-images", convertRoute);
34app.route("/api/images-to-pdf", convertRoute);
35app.route("/api/compress", compressRoute);
36app.route("/api/watermark", watermarkRoute);

pdfconvert.ts24 matches

@pro562Updated 1 month ago
5const app = new Hono();
6
7// PDF to Images conversion
8app.post("/", async (c) => {
9 try {
11 const operation = url.pathname.split('/').pop();
12
13 if (operation === 'pdf-to-images') {
14 return await convertPdfToImages(c);
15 } else if (operation === 'images-to-pdf') {
16 return await convertImagesToPdf(c);
17 }
18
27});
28
29async function convertPdfToImages(c: any) {
30 const formData = await c.req.formData();
31 const file = formData.get('file0') as File;
37 }
38
39 // Note: PDF to image conversion requires canvas/image processing
40 // This is a simplified implementation that would need additional libraries
41 // like pdf2pic or similar for actual image conversion
42
43 return c.json({
44 success: false,
45 error: "PDF to image conversion requires additional image processing libraries. This feature is not yet implemented in this demo."
46 }, 501);
47}
48
49async function convertImagesToPdf(c: any) {
50 const formData = await c.req.formData();
51 const files: File[] = [];
59
60 if (files.length === 0) {
61 return c.json({ success: false, error: "Please upload at least one image file" }, 400);
62 }
63
65
66 for (const file of files) {
67 if (!file.type.startsWith('image/')) {
68 return c.json({ success: false, error: `File ${file.name} is not an image` }, 400);
69 }
70
71 const arrayBuffer = await file.arrayBuffer();
72 let image;
73
74 try {
75 if (file.type === 'image/jpeg' || file.type === 'image/jpg') {
76 image = await pdf.embedJpg(arrayBuffer);
77 } else if (file.type === 'image/png') {
78 image = await pdf.embedPng(arrayBuffer);
79 } else {
80 return c.json({ success: false, error: `Unsupported image format: ${file.type}` }, 400);
81 }
82
83 const page = pdf.addPage();
84 const { width, height } = image.scale(1);
85
86 // Scale image to fit page while maintaining aspect ratio
87 const pageWidth = page.getWidth();
88 const pageHeight = page.getHeight();
92 const scaledHeight = height * scale;
93
94 page.drawImage(image, {
95 x: (pageWidth - scaledWidth) / 2,
96 y: (pageHeight - scaledHeight) / 2,
99 });
100 } catch (error) {
101 return c.json({ success: false, error: `Failed to process image ${file.name}` }, 400);
102 }
103 }
108 headers: {
109 'Content-Type': 'application/pdf',
110 'Content-Disposition': 'attachment; filename="images-to-pdf.pdf"',
111 'Content-Length': pdfBytes.length.toString(),
112 },

pdfProcessingOptions.tsx1 match

@pro562Updated 1 month ago
37 );
38
39 case 'pdf-to-images':
40 return (
41 <div className="space-y-4">

testPondiverseupdateTable1 match

@argmnUpdated 1 month ago
9 data TEXT,
10 type TEXT,
11 image TEXT,
12 time DATETIME NOT NULL
13 )`,

pdftypes.ts7 matches

@pro562Updated 1 month ago
54 },
55 {
56 id: 'pdf-to-images',
57 name: 'PDF to Images',
58 description: 'Convert PDF pages to PNG or JPG images',
59 icon: '🖼️',
60 acceptedFiles: ['.pdf']
61 },
62 {
63 id: 'images-to-pdf',
64 name: 'Images to PDF',
65 description: 'Convert images to PDF format',
66 icon: '📄',
67 acceptedFiles: ['.jpg', '.jpeg', '.png', '.gif', '.bmp'],
78 id: 'watermark',
79 name: 'Add Watermark',
80 description: 'Add text or image watermarks to PDF pages',
81 icon: '💧',
82 acceptedFiles: ['.pdf']

pdfREADME.md4 matches

@pro562Updated 1 month ago
7- **Merge PDFs**: Combine multiple PDF files into one
8- **Split PDF**: Extract specific pages or split into separate files
9- **PDF to Images**: Convert PDF pages to PNG/JPG images
10- **Images to PDF**: Convert images to PDF format
11- **Compress PDF**: Reduce PDF file size
12- **Add Watermark**: Add text or image watermarks
13- **Extract Text**: Extract text content from PDFs
14- **Rotate Pages**: Rotate PDF pages
47
481. Select the PDF operation you want to perform
492. Upload your PDF file(s) or images
503. Configure operation settings
514. Process and download the result

pdfREADME.md1 match

@pro767Updated 1 month ago
31- `RotateOptions`: Rotation angle and pages
32- `ProtectOptions`: Password and permissions
33- `ConversionOptions`: Image format and quality
34
35### ProcessingResult

pdfREADME.md4 matches

@pro767Updated 1 month ago
16- Merge PDFs
17- Split PDF
18- PDF to Images
19- Images to PDF
20- Compress PDF
21- PDF Info
34### File Upload
35- Drag and drop support
36- Multiple file selection for merge/images-to-pdf
37- File type validation
38- File size display
43- **Rotate**: Angle selection and page targeting
44- **Protect**: Password input
45- **PDF to Images**: Format and quality selection
46
47### Processing

pdfREADME.md5 matches

@pro767Updated 1 month ago
19- **Response**: PDF file download or JSON error
20
21### POST /api/pdf/pdf-to-images
22Convert PDF pages to images (info only - actual conversion requires additional libraries).
23- **Body**: FormData with `file0` and `options`
24- **Options**: `{ format?: 'png'|'jpg', dpi?: number }`
25- **Response**: JSON with conversion info
26
27### POST /api/pdf/images-to-pdf
28Convert images to a PDF document.
29- **Body**: FormData with multiple image files
30- **Response**: PDF file download or JSON error
31

pdfpdf.ts17 matches

@pro767Updated 1 month ago
138});
139
140// PDF to Images (simplified - returns info about conversion)
141app.post("/pdf-to-images", async (c) => {
142 try {
143 const { files, options } = await parseFormData(c.req.raw);
150 const info = await getPDFInfo(pdfBytes);
151
152 // Note: Actual image conversion would require additional libraries like pdf2pic
153 // For now, we return information about what would be converted
154 return c.json({
165});
166
167// Images to PDF
168app.post("/images-to-pdf", async (c) => {
169 try {
170 const { files } = await parseFormData(c.req.raw);
171
172 if (files.length === 0) {
173 return c.json({ success: false, message: "At least one image file is required" });
174 }
175
177
178 for (const file of files) {
179 const imageBytes = new Uint8Array(await file.arrayBuffer());
180 let image;
181
182 if (file.type === 'image/png') {
183 image = await pdfDoc.embedPng(imageBytes);
184 } else if (file.type === 'image/jpeg' || file.type === 'image/jpg') {
185 image = await pdfDoc.embedJpg(imageBytes);
186 } else {
187 continue; // Skip unsupported formats
189
190 const page = pdfDoc.addPage();
191 const { width, height } = image.scale(1);
192
193 // Scale image to fit page
194 const pageWidth = page.getWidth();
195 const pageHeight = page.getHeight();
199 const scaledHeight = height * scale;
200
201 page.drawImage(image, {
202 x: (pageWidth - scaledWidth) / 2,
203 y: (pageHeight - scaledHeight) / 2,
212 headers: {
213 'Content-Type': 'application/pdf',
214 'Content-Disposition': 'attachment; filename="images.pdf"'
215 }
216 });
218 return c.json({
219 success: false,
220 message: error instanceof Error ? error.message : "Failed to create PDF from images"
221 });
222 }

thilenius-webcam1 file match

@stabbylambdaUpdated 5 hours ago
Image proxy for the latest from https://gliderport.thilenius.com

simple-images1 file match

@blazemcworldUpdated 5 days ago
simple image generator using pollinations.ai
Chrimage
Atiq
"Focal Lens with Atig Wazir" "Welcome to my photography journey! I'm Atiq Wazir, a passionate photographer capturing life's beauty one frame at a time. Explore my gallery for stunning images, behind-the-scenes stories, and tips & tricks to enhance your own