U-Boot "bmp display <address>" does not show picture - raspberry-pi3

I am using buildroot with rpi3-64 configuration; integrated is uboot 2019.07.
I did several configurations but I am unable to display a picture with bmp display
The screen resolution is set to 1080p with config.txt hdmi_mode=16
I loaded the image via tfp <addr> <host>:/test.bmp
Check it with bmp info <addr> shows the correct information about the bitmap.
When calling display it simple return the input command line and does nothing
What I tried so far:
Create a full screen 1080p bitmap with 32bit also 24bit, 8bit results in an error that bitdepth do not fit to the frame buffer environment - as expected (or something like this message)
I tried lower resolution i.e. 1024*768
but had also no success with it.
I wonder if there is still any video/Fb setting to be made. Do I need special bmp setting.
Any ideas?

I'm not using buildroot, so apologies if this differs slightly. To get this working on my pi3, I had to modify u-boot/include/rpi.h to include this snippet.
#ifdef CONFIG_DM_VIDEO
#define CONFIG_BMP_32BPP
#endif
This only adds support for 32 bits/pixel, so if you need 8/16/24, use those instead.
This was tested on commit ecd4d99f654f3f7bfb96001891d69c3125e70b69 of the master branch, but I suspect it'll work on most versions.

Related

GhostScript Image Quality issue while Printing

Am using GhostScript.Net 1.2.0 version. Am converting a pdf file into list of images to print. My Printed image height and width is fine but the printed image quality is poor. Please help me how to improve the image quality while converting a pdf to image using ghostscript.net
You need to either take this up with the Ghostscript.Net maintainer or find some way to tell us what command line/configuration you are using (ALL of it!), you will also need to supply an example file and define what you find objectionable in your current prints. 'image quality is poor' is extremely subjective, not helpful at all, there could be many, many reasons for 'poor quality', starting with your input file.
You also need to state what operating system you are using, and what your printing setup is. If you have tried anything already, then you need to say what you have done or we will waste much time suggesting dead ends.
Note that if you are using the mswinpr2 device, there may be little that can be done as that relies on the printer driver in the Windows system to do the actual printing.

Problems when using RyTrack, the GUI-based particle tracking interface written in IDL

I am using RyTrack(http://sun.iwu.edu/~gspaldin/rytrack.html) to do particle trakcing, and when I follow the instruction, as below
INPUTS: (Once the GUI has been called ...)
1) Image directory: The path to the image sequence files of interest.
Windows example: C:/myfolder/*.tif
UNIX example: ~/myfolder/*.tif
(Note: The program can accept tif, jpg, or bmp formats, among others.)
start: begins a frame-by-frame display. The original image is shown in the
top displayand the filtered image in the bottom display.
Once started, the image processing
can be changed on the fly, and the results of these changes will become
evident in the bottom image."
after i clicked start, nothing happens and IDL said
IDL> rytrack
Widgets are initialized
XMANAGER: Caught unexpected error from client application. Message follows...
Attempt to call undefined procedure/function: 'RYTRACK_EVENT'.
Execution halted at: XMANAGER_EVLOOP_STANDARD 478 H:\RSI\IDL55\lib\xmanager.pro
XMANAGER 708 H:\RSI\IDL55\lib\xmanager.pro
RYTRACK 856 E:\Dropbox\Research\Resources\rytrack.pro
May I ask how could I fix this and let it work?
Thanks.
It worked for me. Were you running it from the .sav file or the .pro file?

Windows CF_DIB to CF_BITMAP in clipboard

I have no practice with windows programming at all, but now I have a problem I want to fix in some program. I need to place an image to windows clipboard and I have raw pointer to valid DIB (device independent bitmap)(in my experiments the dib header version is 3). The program uses the model with delayed clipboard rendering, which means that at first we use SetClipboardData(CF_DIB, NULL) and then on WM_RENDERFORMAT message the program place the actual data to clipboard with SetClipboardData(format, dibDataPointer).
When I open clipbrd.exe (on windows xp) and I choose the DIB view, I can see an Image without any problem. But in msdn is written that the system can render automatically from CF_DIB to CF_BITMAP format. I think that's why when I look in clipbrd.exe I see 2 formats: DIB and BITMAP. When I select in clipbrd.exe the bitmap format I got an error. At first when I looked at the code I saw that there is no case for CF_BITMAP in system message handler function, so when system asks to render CF_BITMAP nothing valid is placed to clipboard, so I added something like this:
switch(format){
case CF_DIB:
case CF_BITMAP: //new code
if(format == CF_BITMAP)//new cOde
format = CF_DIB;// new code
....
SetClipboardData(format, dibDataPointer);
....
and hope (actually, I knew that won't gonna work, but gave this way a try) that the system will recognize that I'm going to give as a response for CF_BITMAP a DIB data and the system will convert in automatically.
So how can I place proper data for WM_RENDERFORMAT message with CF_BITMAP format from the system if I have a DIB data (generally it would be better if I could use the system ability to convert DIB to BITMAP rather then create BITMAP from DIB manually)?
Update:
So I found how to fix the issue. At first it's needed to register for delayed rendering only the CF_DIB with SetClipboardData(CF_DIB, NULL). The CF_BITMAP format will be added to the available clipboard types by Windows automatically. Then you need to pass the dib data with header of the first version which is described by BITMAPINFOHEADER (I have v3 version, I doubt that v4 and v5 headers are going to work) structure with positive biHeight (Y Coordinate) on WM_RENDERFORMAT with CF_DIB format required (the system won't ask you for CF_BITMAP because you didn't register it manually). And in this particular case the system will convert CF_DIB to CF_BITMAP automatically. I don't know will this work with any of the compression method for bitmap data, because I've tested only the BI_RGB uncompressed images.
Every other version of bitmapinfo dib header is reverse compatible with BITMAPINFOHEADER and can be successfully copied with memcpy. But don't forget to set biSize to sizeof(BITMAPINFOHEADER). The second part is to setup positive Y coordinate. (I really hope that DIB format with compressed data should always have positive height.) But for uncompressed bitmaps biHeight can be less then zero, and should be made to a positive value. This will cause the image to be upside down, so it's needed to reverse image rows. The mention should be made that the rows are aligned by 4 bytes.
And the worst thing is that all this standards for headers are described in microsoft documentation. But. for example, Paint can get the dib info v3 header with negative height value, the clipbrd.exe can get v3 header with positive height. The wordpad wants only v1 header with positive height. And the windows converts DIB ro BITMAP only with v1 header and positive height. This all are applications which are distributed with windows (no clipbrd.exe in Vista or later). This is a terrible hell. I hope there won't be any more programming for Windows in my entire life.

OSX: automated (every 1-2sec) screenshot (not full screen but (x,y,w,h)) using python

I want to make screenshots on OSX using python. I dont want make full screen shots but only certain rectangles on the screen. Something like (291,305,213,31). I need the correct pixel because afterwards the image files are processed by OCR (python-tesseract) to extract the text.
By the way this is since 6 years the first time I am programming, so far I only know Java a bit. I started yesterday and gave up this morning at 4am. So basically I have no clue yet...For example I still cannot build with Sublime because of path settings, but thats a different story. Cant figure out everything on one day.
I was trying already the following:
- wxPython
But the result are black images, see also:
stackoverflow.com/questions/8644908/take-screenshot-in-python-cross-platform
Additionally it only works in 32-bit mode, but when I do OCR using python-tesseract openCV requires 64-bit....
autopy
when trying to install I got errors, see also:
stackoverflow.com/questions/12993126/errors-while-installing-python-autopy
ImageGrab
only Windows
effbot.org/imagingbook/imagegrab.htm
commandline screencapture
os.system('screencapture test.png')
When I found this I thought, nice but only fullscreen when checking man screencapture. But then I found this: guides.macrumors.c om/screencapture
-R capture screen rect
That would be already enough, but on OSX 10.7.5 I dont have this option. Any ideas?
import Quartz.CoreGraphics
neverfear.org/blog/view/156/OS_X_Screen_capture_from_Python_PyObjC
Create screenshot as CGImage
image = CG.CGWindowListCreateImage(
region,
CG.kCGWindowListOptionOnScreenOnly,
CG.kCGNullWindowID,
CG.kCGWindowImageDefault)
Unfortunately the image is not in file format but a CGImage, no idea how to save as file.
So if possible I would like to use the commandline screencapture with -R if somebody knows how. Just as a start to continue.
Are there any other command line tools available?
What about other libs that I have missed?
Cheers
M
Given that you can get a CGImageRef, you can get its pixel data using the techniques described in Technical Q&A QA1509: Getting the pixel data from a CGImage object. In particular, it shows a function to get the pixel data as a CFDataRef using this function:
CFDataRef CopyImagePixels(CGImageRef inImage) { return CGDataProviderCopyData(CGImageGetDataProvider(inImage)); }
and says:
The pixel data returned by CGDataProviderCopyData has not been color
matched and is in the format that the image is in, as described by the
various CGImageGet functions …
It shows an alternative for getting the pixel data in other formats if you need that.

wix override ui banner causing artifacts

I am trying to overrride the banner in my custom wix ui.
I have successfully done this using
The banner normally looks like this:
When I build the MSI and run it the banner is replaced but there are weird artifacts in it like this:
The edges seem to have gone all jagged (note the white up the top was me blanking out product name)
Is there a reason why the image goes like this and possible a way to avoid it?
Irfanview shows the following for the image properties:
This is because the banner size in the MSI Wizard is different from the described default size of 500 × 63. You can use Paint to measure the banner. I've got 494 × 58 px on your screenshot. (I can't say the size of the banner bitmap we use at the moment, will add later.)
Note however: this size will work for default DPI setting of 96 dpi. If you choose 120 dpi or other settings, the size of the dialogs will grow, bitmap will be scaled and look jagged consequently. I do not know a workaround to this.
From what I could tell the original image was actually 500 x 63 (at least as reported by IrFanView and Paint)
I made a new image that was the size of 493 x 58 and DPI of 96 and this seems to have prevented the jaggies.
I looked at the Wix source and the UIExtension dialogs have the following line (or similar)
It looks like the image control is set to 370x44. I did try creating an image that size but still had problems.

Resources