Many bmp files to one file - bmp

I got 7000 bmp files and each file is 1kb big with a single letter in it (ascii-code).
I have no idea how to open them all together.
I tried pdf printers but I can't print the bmp files because the printers say they are broken. I can open the files with "irfanview" but only 1 file after another and not together.
Thanks in advance.

Assuming all the images are of a fixed size, here's some psuedocode you can use in something like C# to open and display all the images:
Create a canvas whose size is the width of 100X width and 70X height of an image.
Loop through each image:
Open image, draw to canvas based on index.
Print your canvas to screen, printer, etc.

If you are a mac user,Use python plot to display all images in terminal

Related

Bigger file for narrower screenshot of web page?

I was trying to archive a web page, and made a screenshot of it which I then saved as heic, but I ran into this weird phenomenon: When I tried a narrower window the image became bigger, and apparently the original png too?
This is my screenshot for a full-sized browser window:
PNG 2,1 MB 6016×3336 HEIC 796 KB 6016×3336.
This is my screenshot for a narrower browser window
PNG 2,4 MB 1532×3408 HEIC 1,1 MB 1532×3408.
How does this make sense? I would love to know.
Web page from the screenshot
PNG encoders filter your image on a line-by-line before compressing them. They can look at a line of pixels and determine if each pixel is heavily based on the line above, or the previous pixel to the left or some more complicated combination of these. They then choose the optimal filter for the line and store it in the output file for the decoder.
As a result, repetitive lines which are largely identical to the line above, or unchanging across the width of the image, are compressed extremely well.
That's what you have in your wider image - there are vast areas of pure white on left and right and they compress very well so although the pixel dimensions are larger, the compression is more effective.

MATLAB: Create a high resolution PDF images

I am trying to convert a high resolution image (30in width x 60in height) to a pdf file in MATLAB. I tried print, exportgraphics, and couple scripts online but I keep getting low quality output. I also tried setting the resolution to 300dpi but it didnt work. Please if you have any suggestions, share with me and I will test. Many thanks!
Image file used (renamed to map.png): https://upload.wikimedia.org/wikipedia/commons/thumb/d/de/Political_map_of_the_World_%28January_2015%29.svg/9444px-Political_map_of_the_World_%28January_2015%29.svg.png
MATLAB commands used:
world=imread('map.png');
imshow(world)
exportgraphics(gcf,'world.pdf','ContentType','vector','Resolution',300)
#Texts in picture is blurry
print -dpdf 'world.pdf'
#Texts in picture is still blurry
exportfig(gcf, 'world.pdf', 'format','pdf','Resolution', 300,'Renderer', 'painters');
#this is a script from the MATLAB file exchange. Texts still blurry
I managed to do it by importing pdfbox (java) and importing the image as a bufferedimage then creating a document with pdmodel.PDDocument then adding a page with a custom size using the bufferedimage.getWidth and same for length then I streamed the bufferedimage to the page and saved the document to a pdf file. The code is on my work PC if anyone is interested I will copy it here.

problems converting images to .ico files

I'm using PIL to convert images to icons
From PIL import Image
img = Image.open(logo.png)
img.save('logo.ico')
it works by creating the logo.ico file, but then it always shows the first image i converted from, if i change the logo.png to another image, it doesn't change the logo.ico from the first image..
also when i convert to .ico the image gets streched weirdly even when i specify the dimentions
those two problems don't happen if i'm converting to other image formats, like from png to jpg for example.
Edit: managed to solve the first problem by creating new.ico files every time using random names for each new one.

Libreoffice Draw Export Resolution makes no sense

I am attempting to make a very simple label using Libreoffice Draw v 4.0.2.2. The label has not much more to it than regularly spaced lines of centered text
This image will be printed, and I have a fixed size/ppi requirement to ensure appropriate print quality.
I set the page size to my specs, and layout the text as I desire. The print shop takes several image formats including .tiff and .png. When I export the image, a dialog pops up that asks for the image size/ resolution. The given ppi is very low (~40) and I require a minimum of 180ppi. When I enter this, the image size adjusts itself and results in an image that is far too small.
The only solution that appears to be viable is to explode the page size and the drawing text size so it gets shrunk upon export. This is a very imprecise and illogical feature (bug?) of the program that I really wish is a result of my ignorance.
I found a thread in the mailing list which describes this issue exactly. The only answer that is given is essentially "yes, this is ridiculous and doesn't help anybody".
Can anyone give some advice to this? Or at least shed some light on who might need this "feature"?
There is something off about the Export tool of LibreOffice in general. It has been years since it is broken. Taking a screenshot is an alternative, but obviously you cannot control the resolution.
So, a better work around is exporting to SVG, and then convert the SVG to PNG with Inkscape. Once downloaded, convert the file with the following command:
inkscape -z -e out.png -w 1024 in.svg
If you are in Windows (x64), you will need to indicate the full path:
"C:/Program Files/Inkscape/inkscape.exe" -z -e out.png -w 1024 in.svg
If you install the 32 bit version, this should work:
"C:\Program Files (x86)/Inkscape/inkscape.exe" -z -e out.png -w 1024 in.svg
This can be done from inside Libre Office, there is no need to use any external tool. The Export dialog is very confusing, yes; you have to realize that both size and resolution can be set independently.
Select File -> Export -> choose the desired format. The export dialog should appear.
TAKE NOTE of Width and Height. Set the desired resolution; notice how Width and Height change (?). Don't worry, restore Width and Height to your saved values. And that's it. You get a high resolution image with the desired size and DPI.
Libre Draw (the one I'm using anyway) is a vector drawing app - have you asked the print shop if they can use vector formats like eps, pdf? Most should be able to in my experience. Then resolution becomes irrelevant.
-Terry

How can I print out a large table of symbols from MATLAB to form a cross-stitch chart?

On this website, one can create stitch charts from images. I'm trying to do this in MATLAB. I have implemented everything using the Image Processing Toolbox (Reducing of number of the colors, mapping to the color space of available yarn colors). I'm done with all of this, the only thing I still need to do is to create an output similar to these files from MATLAB, which basically show which yarn to use for each raster point of the stitch chart:
BW
Color
My question is how to print a table with a lot of very small fields with the color and/or symbol inside.
It should look somehow like in these PDF files. How can I print out a table like this? Directly from MATLAB? Can I create a PDF file like this in MATLAB? Should I export it to Excel somehow?
For the "color" PDF you linked, this looks just like a pixelated image. Why don't you save each "field" as one pixel, for example in a TIF file using imwrite(I, 'filename')? You could then print this TIF into a PDF using an appropriate scaling factor to make the pixels large enough.
For the "BW" PDF which basically contains a large table of symbols, it would probably be easiest to go through HTML or RTF file format to get the table of symbols, and then use some html2pdf or rtf2pdf converter...