hello guys!!
i have made a program which is inside pixel.zip file
download and extract this file and you will get folder named pixel
inside that folder run pixel.exe which is made by me and it will display 3 100width x 100height RGB squares
make sure you run this file without deleting any .dll files
and also it will run in windows only
So...my question is..
does bmp png etc uncompressed image file formats stores data like this?
read source code of my program..
+ Reply to Thread
Results 1 to 30 of 33
-
Anonymous543Guest
Last edited by Baldrick; 5th Jun 2022 at 12:10. Reason: Link removed
-
No. Neither I or anyone will download and run a file with a potentially virus loaded exe! Reported.
-
Anonymous543Guest
It doesn't contains any virus ,you would have check first with anti virus before removing link, it was just a small software which was made by my self ,even i have written the source code of that exe inside the zip file-_-
-
It does not matter. The file was un-solicited. Really, if you want to promote a program you must do this via the admim of the forum first.
-
Anonymous543Guest
I didn't wanted to promote any files ,i just wanted to clear my doubts, i agree that i should i have asked to admins first before posting links ,but there should be an another rule for false reports.
-
Here's the thing @kirito, and I think this has been pointed out to you before.:
There are very few reasons to reinvent the wheel.
You are trying to learn? Then learn, using appropriate, definitive, historically grounded reference material, guided by respected coaches & experts to keep you focused on the right path.
You have a format that is novel and/or better than others? You build out a prototype that allows for objective comparison to those others. Doing so objectively requires other factors to be the same so that only the characteristics in question are evaluated in isolation. To do so with known formats requires that yours be structured to be compatible with existing players.
Also, subsequent sharing of your format also means being compliant with standards.
You gave us (well, me at least) the impression you were working on the 1st thesis. Then you post something mysterious that possibly is a proof of concept of your 2nd thesis. But you expect us to risk the security of our systems just because you don't want to follow (or have the patience to follow) the standards? Think again.
Plus, you have never really stated what your end goal is, so there is no way to properly evaluate.
Scott -
Anonymous543Guest
Source code =
You have to copy paste this lines and make filleCode:function love.draw() love.graphics.setColor(1, 0, 0) --sets color red love.graphics.rectangle("fill", 0,0, 100,100) --draws square of red color 100x100 at cordinate x=0 y=0 love.graphics.setColor(0, 1, 0) --sets color green love.graphics.rectangle("fill", 0,100, 100,100) --draws square of green color 100x100 at cordinate x=0 y=100(here y=100 so that it will display under red sqaure) love.graphics.setColor(0, 0, 1) --sets color blue love.graphics.rectangle("fill", 0,200, 100,100) --draws square of blue color 100x100 at cordinate x=0 y=200(here y=200 so that it will display under red sqaure and green sqaure) end
Name and extension main.lua
And run it through love2d engine
https://youtu.be/ZQCky-_Ad5Y
Here is simple tutorial video on how to load files in love2d by drag and drop
And you can download love2d engine from its official website ,it's file size is below 5mb
I wanna know how bmp and png was created and in which language they store pixel data -
Anonymous543Guest
Am not interested to make games i just wanna know how bmp png and other image file format works using may be graphics or idk
-
You have already been given links to definitive documents.
You understand that they are compressed or uncompressed versions of binary rectangular arrays, with structured color systems, sampling ratios, plane ordering, bit depths...
There are, also, accompanying headers & metadata to facilitate ease of understanding & decoding by the decoder/player.
If you are asking about bmp, look up the RIFF structure. PNG is a more open & modern standard, but both have been around long enough that there are no longer patents on their use, so the info should be readily available to someone who puts effort into the research.
If you need to poke at the internals, you can always use a hex viewer.
Scott -
Anonymous543Guest
Bmp ,png and other files needs decoders ,but the way i made that .exe doesn't need any decoder ,i guess it just directly draw /display color information from the source code..
There's one disadvantage of is requires .dll files to run .exe and which i think is not a big disadvantage because .dll files does not take much space , if we compare this things with bmp and pngs then they also requires decoders and they also take space.. -
Anonymous543Guest
If you read my source code then..in source code i have given instructions to draw 3 rectangles of same width height of 100×100 it's actually called a square but in love2d Syntex we have to write love.graphics.rectangle
This 3 squares has 3 diffrent colours which is primary colors RGB and 3 squares has diffrent locations -
Anonymous543Guest
So i think images are nothing but just set of instructions which graphics process..
-
So your method does not generate an independent, portable, standards-compatible media file, but is basically a binary version of source code instructions, and your "player" (which is just a runtime interpreter) is just generating the image based on your instructions.
Perhaps you should look up info on Vector graphics (e.g. Adobe illustrator, postscript), because that is exactly what that is doing.
One thing you will find out soon enough is that Vector graphics are compact when dealing with clean, abstract, geometric images, but then balloon to unwieldy sizes (even well beyond bitmap graphics) when dealing with real-world images.
Plus your method is only as good, versatile and as portable as your runtime. You say you don't want to do games, yet you're specifically using an API geared towards gaming...?
ScottLast edited by Cornucopia; 5th Jun 2022 at 14:01.
-
Anonymous543GuestYess it will not work on all platforms like.. windows .exe files won't run in linux or mac directly..So your method does not generate an independent, standards-compatible media file
Butt if we have source code(image data) then we can compile it to any other platforms
I know lil bit about vector graphics in that we have to specify radius of circle or dimensions of square, rectangles etc not sure about it ,Vector graphics are compact when dealing with clean, abstract, geometric images
Vector graphics will not suited for real world images that i agree because of many complex details..
But will it suit if we make short animation..like if i draw a character and make it little walk or talk(audio in sync)?
Well i wanted to make images in different way..not with Photoshop or paint ,and my computer specifications are too low so i just wanted an simple small API which deals with graphics that's why i chosed love2d ,You say you don't want to do games, yet you're specifically using an API geared towards gaming...?
Another reason is i tried to code in c/c++ but adding graphics in this kind of language is very complex and i didn't understand the process ,plus am not professional in programing -
Maybe learn about existing bicycle types before inventing another one? You are at least 35 years behind.
-
Fast - Cheap - Good.
Sounds like you went with the 1st 2.
Scott -
I'd focused what is already useful for other things, like Python, C or java.
I don't think Python is much more difficult than lua language and can catapult you to design other stuff, even for work if you are younger.
https://realpython.com/pygame-a-primer/
you can google some youtube pygame tutorial, or get other animating module for python, don't know, there might be more of them, better suited for your purpose
And again, I'd use modules already written for creating images, for example within that pygame module it is:
pygame.image.save(your_surface, 'xxxxx.BMP')
or using opencv, you still did not describe what you want to do exactlyLast edited by _Al_; 5th Jun 2022 at 16:22.
-
If Paint is too demanding for you computer, then your only choice is to go analog.
What means "deals with graphics", what do you want to do?Last edited by VoodooFX; 5th Jun 2022 at 17:46.
-
You are using a high level graphics library. Everything is abstracted. That is done so you don't have to understand what's happening with pixels and other low level data structures. Exactly what you don't want if you're trying to understand graphics at the lowest levels. Since the library is drawing something on the screen in Windows it is at some level producing Windows Bitmap data. But whether you can save that data to a BMP file depends on whether or not it's made available to you. You'll have to read the library's docs. In all likelihood they provide functions for that.
Basically, you know so little that you're asking questions that don't make any sense. Do yourself a favor an go buy yourself a book like Computer Graphics Principles and Practice by Foley/VanDam. Learn the basics.
https://www.amazon.com/Computer-Graphics-Principles-Practice-2nd/dp/0201848406/Last edited by jagabo; 5th Jun 2022 at 20:16.
-
No, "images" (if you refer to graphic formats such as bmp, png, jpg..) are NOT set of instructions.
You seem a bit confused: the creation of an image through programming and some "instructions" (as in your love2d example) is a totally different thing from images stored in raster file formats (the ones you mentioned in the title). The most similar thing to an image built through programming - even NOT the same thing - are vector file formats (such as svg) , as they are completely different from raster graphic file formats.
In a raster graphic file format (such as bmp, png, jpg ) images are simply chunks of data organized in some very specific way (different for each format) that then the software "decodes" to represent the image itself, but those data are (for the most part) only information about the color of each pixel - plus some additional information, such the header and tags - absolutely not instruction as in some kind of code in a program.Last edited by krykmoon; 5th Jun 2022 at 18:54.
-
Anonymous543Guesti chosed lua because its usefull for scripting in android@_Al_
I'd focused what is already useful for other things, like Python, C or java.
I don't think Python is much more difficult than lua language and can catapult you to design other stuff, even for work if you are younger.
we can run some lua scripts with gameguardian.apk to cheat small games and level up..
gameguardian.apk is just like cheatengine of android
love2d engine also has some modules like this@_Al_
And again, I'd use modules already written for creating images, for example within that pygame module it is:
pygame.image.save(your_surface, 'xxxxx.BMP')
example code
this will draw any png file with using love2dCode:function love.load() whale = love.graphics.newImage("whale.png") end function love.draw() love.graphics.draw(whale, 300, 200) end
i tried to use opencv with c/c++ but it requires so many things like..first need to setup IDE then compiler and then configure graphics.h file and etc etc..@_Al_
or using opencv,
i am just intrested to know more about image file formats,@_Al_
you still did not describe what you want to do exactly
paint is not demanding ,i just wanna draw some images without using modern image formats like png and bmp@VoodooFX
If Paint is too demanding for you computer, then your only choice is to go analog.
and also that should be lossless!!
means give commands to graphics and display something which looks like image@VoodooFX
What means "deals with graphics", what do you want to do?
[Attachment 65228 - Click to enlarge]
This screenshot for those who did not watched my program..
pixel.exe is displaying 3 RGB(we can create any color by mixing) square of 100x100 without any quality loss i guess..
does PNG and BMP stores data like the way i did?
like this
graphics.Color.informationofpixel1(red)
graphics.pixel1(x,y cordinates)
graphics.Color.informationofpixel2(green)
graphics.pixel2(x,y cordinates)
graphics.Color.informationofpixel3(blue)
graphics.pixel3(x,y cordinates) -
-
How they are engineered? That you can find on wiki, but you should not be concerned about that at this moment, but you do not realize that. Each system, library, module you are going to use does it for you. Saves it into that format if needed, because internally within app it works differently. Those BMP and PNG are stored as a bitmap, where every pixel has a defined value for R,G,B and alpha (or YUV set etc). But how your app works, is app dependent or module dependent. It is about how those data is written in memory, to access them fast again and change them, possibly as quickly as possible and en masse! So when your app loads a BMP image or creates an image, what happens is, it effectively stores it in your memory . Imagine your code has many many lines drawing circles , rectangles. Where processing first line (example drawing a circle), needs to be stored somewhere before second line is processed, drawing is made again on top of it, etc. and that storing order/format in your memory is not the same as your loaded BMP was stored.. That could differ from app to app.i am just intrested to know more about image file formats,
No, after loading a BMP image, data is stored in memory depending how you app works, it is stored as bitmap of some sort but sort of reorganized. Data could be packed (every pixel data for R,G,B and Alpha are next to each other) or planar (R values are next to each other, G value are next to each other,...) or whatever sort of arrays in memory (stored with start of data, size , dimension, bitdepth, like numpy arrays) and to store it effectively for fast memory access. Or if you make up an app you can made that up yourself how data is stored in memory and accessed thru pointers ( memory address where data starts, I guess C only). Within your app you could store data as a set of instructions (but not by a code as you posted, it would be again bunch of data with rules) but if you draw something on the top of something for a preview you'd need to draw a bitmap anyway to get it on screen. For a preview you need a bitmap. Certainly you cannot store data for a BMP as a set of instructions or rules. Instead, it is used a thing called compression (using a codec). You can save then a lossless (PNG), or lossy (JPG). Or of course as a raw form (BMP). Unlikely you'd compress within your app between drawings. Anyway, perhaps unless using C, there is modules, libraries, that take care of of storing and rewriting data in a dimension most effectively and guys developing that dedicate half of their lives (or teams) to design it. You have no chance to come up with anything faster or introduce a new standard. You posted some DLL's, that's what it is most likely, some libraries to get graphics. Set of your instructions to make a bitmap from your code or rather data that your app created in your memory. If your image data is some sort of set of instructions, that can be loaded only in your app or with some interpreter to bitmap, planar memory, array ... That is quite common (but not to store images) and it is called project file. After loading, you load that set of instructions that are unique only for your app and you continue your work after last time you saved it.does PNG and BMP stores data like the way i did?
like this
graphics.Color.informationofpixel1(red)
graphics.pixel1(x,y cordinates)
graphics.Color.informationofpixel2(green)
graphics.pixel2(x,y cordinates)
graphics.Color.informationofpixel3(blue)
graphics.pixel3(x,y cordinates)Last edited by _Al_; 6th Jun 2022 at 13:21.
-
[Attachment 65229 - Click to enlarge]
How could be image stored in temp memory example, if using numpy, but that copies perhaps most scenarios where lines are stored one after each other:
So lines are stored one after each other in memory, I'm sure format makes sure it ends with proper DWORD length etc., so technically when loading BMP into an app, data could be interpreted into memory right in the same order like they are arranged in BMP. That is for someone knowledgeable to answer. But point is your app communicates with memory (located on RAM). Where BMP was loaded and stored somewhere else. And also when BMP image is stored from your app (memory) that could take longer, because your code needs to be evaluated from code lines into your memory as a bitmap and then BMP is created and saved.Code:[[#first line (it is in BGR format, not RGB, so first line has max red values only) [ 0 0 255] [ 0 0 255] [ 0 0 255] ... [ 0 0 255] [ 0 0 255] [ 0 0 255]] [#second line (red line again) [ 0 0 255] [ 0 0 255] [ 0 0 255] ... [ 0 0 255] [ 0 0 255] [ 0 0 255]] .... [#last line (blue line) [255 0 0] [255 0 0] [255 0 0] ... [255 0 0] [255 0 0] [255 0 0]]]
-
If you don't want to use image formats then why do you want to know about them?
What is about that "lossless" when you are not saving images to file?
What kind of commands? Display the plain 3 color squares? For what purpose? -
To expand on what was just mentioned,
Media files can be CONCRETE or ABSTRACTED.
A concrete picture file is an actual raster/bitmap graphic array such as *.BMP or *.PNG, where a 3x3 pixel square in Red looks like this (using "R" instead of a filled rectangle like "█" ):
or...Code:RRR RRR RRR
if you really wanted to use up the whole rectangular character "pixel" area.Code:███ ███ ███
Whereas an abstract picture file is "described" in a higher-level form. The most common types are vector graphics, like *.AI or *.PS, where a set of instructions tell the rasterizing engine (which is necessary because EVERY current display type is raster-based) to draw onto a virtual or real raster. It would look something like this:
These are both following common standards (that last one is NOT the actual code, but a stylized synopsis), so that any user can easily both create, share, and consume those files in a highly portable fashion.Code:Create Square (or Rectangle), 3 units wide by 3 units high, color = Red Draw Square
There are similar variations with sound & music files (WAV is concrete, MIDI is abstract) or fonts (printer/screen fonts are concrete - raster, while truetype/opentype/postscript fonts are abstract - vector).
There is AFAIK no known form of abstracted video, as it would be WAY too huge and cumbersome, although the old sprite animation used by Macromedia (Adobe) Director & Flash had some of that in smaller forms.
Abstracted files of ALL types need some form of "concretizing" (usually called rendering) engine on the client end in order for it to be mapped to the concrete devices available to the end user. By the way, in terms of mapping, notice how in my abstract example, it used "units" instead of pixels? That's because those units need to be mapped to the concrete device it is outputting to, and that might or might not be a 1:1 mapping. With vector graphics, this works much like an analog Pantograph.
***********
So you want to learn about images/graphics...does that mean concrete images/graphics, or abstract images/graphics, or both? or something else entirely different?
And when you say you want to learn about them, WHAT do you want to learn?
ScottLast edited by Cornucopia; 6th Jun 2022 at 16:02.
-
Start here: http://paulbourke.net/dataformats/bitmaps/
Note that bitmap is a class. BMP is a particular implementation of that class.
Similar Threads
-
Extract frames as uncompressed image files
By Fern99 in forum Newbie / General discussionsReplies: 4Last Post: 22nd Jul 2021, 10:42 -
Export PNG image sequence in Vegas 13?
By vegas13 in forum Newbie / General discussionsReplies: 7Last Post: 16th Dec 2020, 21:38 -
How To Convert A Single Video Image to PNG/BMP
By cornemuse in forum Video ConversionReplies: 9Last Post: 29th Nov 2019, 11:47 -
Converting TTML2+PNG Subtitles to BDN(XML+PNG)
By MounaLafi in forum SubtitleReplies: 6Last Post: 25th Jan 2019, 06:48 -
batch to convert all image files into BMP format
By marcorocchini in forum Newbie / General discussionsReplies: 15Last Post: 28th Dec 2017, 12:07

Quote

