Opening pictures as text files?

What do?

Other urls found in this thread:

kb.winzip.com/kb/entry/104/
twitter.com/SFWRedditVideos

you read the spec and view it with hexdump

You've fucked your file type associations. Look up shit for your distro related to xdg-open

your kernal is currupted

>uses a graphical image viewer
>actually can't decode the huffman tables and do reverse dct in their head

Thanks, but no. I intentionally changed it so I can open images as text files (also changed the image extension to txt), but the problem is the encoding thing that won't allow me to edit them as I intended to.

better yet, learn how to interpret the binary data yourself and reconstruct the image in your own mind while reading this

the fuck are you trying to do? if you want a gtk hex editor, try bless

test2.txt

They can't be edited as text files, because they aren't text files. The contents don't correspond to valid UTF-8 (or any other text encoding), which is what your text editors have the ability to display and edit.

Try a hex editor, or a JPEG encoding library, or read the JPEG specification and write something yourself.

>brainlet detected

>not using run length encoding

Enjoy your shitty performance

ur a faggot alex baldwin

you can look up the file RFC and actually see the plain text areas and how the file headers work, then use a hexeditor and go to work.

Or convert it to .bmp

Convert them to .mp3 instead.

What the fuck is this shit you told me to install? I just want the info inside the image written as a very long text chain. All I want is that when I change the extension to jpg it reads as an image and when I change it to txt it reads as a text file (with no shitty encoding trouble), this kind of editor only makes it more complicated. What encoding thing should I install to make it so that my gedit can open it as a text file?

a jpg is not a txt file

install gentoo

Everything that isn't a binary is a text file you brainlet.

>I just want the info inside the image
Are you taking about metadata?

No. I'm talking about the image itself represented as a string of characters.

Ok Windows could actually do it OOTB. Now I can proceed with my project. Fuck you all for being memesters and ignorant retards, except the two or three guys who legitimately tried to help.

...

Please be bait.

What's bait about it you fucking retards? All files are just data that makes sense because your computer knows to interpret it in a specific way. Nothing stops you from taking the data of a file and storing it as a different type of file, e.g. a jpg to mp3. Of course the mp3 wouldn't make sense and your system would think it's a corrupted file, but that doesn't stop you from later on using that data to create a jpg that would be an exact copy of the original file. Fucking neo Sup Forums, stop browsing any time dumbasses.

I will repeat and (it's not me, but I'm sure the author agrees)

It's because you don't know the correct terminology for what you're asking, or you're actually stupid. Do you want the colors of the image written out to a text file in a human readable way? Do you want to manipulate the JPEG-encoded representation of the image (apparently not, since that's what you'd use a hex editor for)?

Windows Notepad is doing basically what GEdit is doing in the OP, trying it's best to interpret a JPEG-encoded image as text. If you were to copy and paste that into another Notepad window, and save it as a jpeg, it would be corrupt, as information is lost when trying to convert the jpeg to text.

If you were to instead copy the hex of the file with a hex editor, then save that, it would work, as the hex perfectly represents the binary information stored in the jpeg file, without losing anything trying to convert to text.

Pic related, Aqua fanart and an exact copy.

Whatever faggot, proof trumps everything.

>Windows Notepad is doing basically what GEdit is doing in the OP

Wrong, gedit would never work because it can't even show some characters.

>If you were to copy and paste that into another Notepad window, and save it as a jpeg, it would be corrupt, as information is lost when trying to convert the jpeg to text.

This is not the 90s anymore, you can do that just fine.

Changing the extension of the copy to txt.

Opening the txt file, selecting all and copying it.

Creating new text file.

Pasting the exact content of the other one here. Even the slightest of changes will make it not work.

Changing extension of new file to jpg.

File is an exact copy of that awuful Aqua drawing. What I was asking in the OP was about how to fix the encoding thing in gedit, I don't know why you retards decided to derail it into a tangential issue. Fuck you.

>edit them as I intended to
What are you trying to do?
What is it exactly that Notepad is going to allow you to do to the image files?
What is your end goal, and how is it better accomplished using Notepad instead of a hex editor?
You say the files are the same after copy/pasting. Did you calculate the MD5 sums of the files? Are you POSITIVE that they're ABSOLUTELY the same? JPEGs are very robust where errors are concerned, just because you don't see errors doesn't mean there aren't any.

I'm not going to insult you, or deride your methodology, but I've never seen anyone bother to use Notepad for something like this, and I'm curious as to why.

>fix the encoding thing in gedit
It's not an "encoding issue". It's a font issue. GEdit didn't have the font necessary to display all the characters as unicode characters, as Notepad did.

But that's Sayaka Miki from Puella Magi Madoka Magica. And as others have mentioned, hex would probably suit your needs better. No reason to try to interpret the binary content of the file in a different format and copy it that way when you can just do the exact same thing with hex while keeping the number of abstractions down.

a jpeg is like 99% binary..

>What are you trying to do?

I am founding a startup around creating a way to store and transfer images using only a fraction of the bandwidth.

>What is it exactly that Notepad is going to allow you to do to the image files?

Obtaining the data inside the image in a string form. Being able to revert it to an image.

>What is your end goal, and how is it better accomplished using Notepad instead of a hex editor?

Everyone has notepad in their computer, nobody even uses hex editors (shit, I didn't even know that crap existed). I can use notepad as resource my invention will integrate to.

>[fear mongering about technical failures]

Pic related. Eat shit pal.

>I'm not going to insult you, or deride your methodology, but I've never seen anyone bother to use Notepad for something like this, and I'm curious as to why.

I understand your skepticism, but this will be hot shit. Sometime in the next few years you will look back and still won't believe that you met the person who reinvented the Internet on Sup Forums. Nobody would believe you anyway.

Yes, this explains why I never managed to use/see certain characters in GNU/Linux. Thanks.

>not knowing what a binary file even is

You probably think that a binary file means that it's full of 1s and 0s heh? You probably didn't mean wrong, but get the fuck out of this thread and stay in the one with the GPUs and game benchmarks.

>I am founding a startup around creating a way to store and transfer images using only a fraction of the bandwidth.

oy vey

>I am founding a startup around creating a way to store and transfer images using only a fraction of the bandwidth.
Give up now. You aren't going to reinvent the wheel unless you magically come up with some algorithm that magically is able to compress already heavily compressed files.
kb.winzip.com/kb/entry/104/
>There also are other types of files that often will not compress well. For example, most multimedia files will not compress much, as they already exist in a highly compressed state. These file types usually employ efficient techniques to compress the data they contain. Examples include, but are not limited to, graphic (picture) files (GIF, JPG, PNG, etc), music files (MP3, WMA, etc), and movie files (AVI, MPG, etc). Files that are compressed, as these examples are, usually cannot be compressed more to any significant extent.

...

>Obtaining the data inside the image in a string form. Being able to revert it to an image.
Have you ever given thought to uuencode or base64? I think they might be right up your alley, as they do EXACTLY this. You probably already have one or both of them installed.

>[fear mongering about technical failures]
It was a legitimate concern, based in absolute fact.

>Doesn't know about hex editors
>Want's to try and beat out current compression algos
HAHAHAHAHAHAHAHAHAHAHAHA

> Opening pictures as text files
> What do?

Change the file extension back to what it was before, then view it? Not sure what else you expected.

first, choose a uncompressed format like bitmap, then use a hex editor.

I'm honestly surprised that works. Notepad probably isn't trying to decode it as any Unicode, because not all binary sequences actually correspond to any text (most is unallocated, for use in future Unicode revisions). It is probably using Latin-1, in which I believe every single byte corresponds to exactly one character.

This would usually be a huge pain in the ass, since Unicode is pervasive, but in this case means it can copy your file losslessly as text.

And as for your startup, you should honestly give up now. There's absolutely no advantage to "transforming" the file into text. This only works because in the encoding notepad happens to use, you aren't actually doing any transformation at all.

All files are a big sequence of ones and zeroes, and lossless compression fundamentally treats all such sequences of ones and zeroes the same. Ie, there is no such thing as "transforming an image into a string", a string is just an abstraction over certain sequences of ones and zeroes, along with an algorithm for rendering them to the screen as text.

>ywn invent anything new, better give up goy!

It's always the same with you assholes, it doesn't even have anything to do with compression; it is an innovative, state of the art system that allows files to be represented in as little as 20% of the space they require. It's because you think like this that I had a very hard time convincing my investor. I will give you a quick rundown in a way that ensures you won't be able to steal it:

>have image
>represent it as text
>assign a number to every possible character
>calculate the value of the text representing the image
>convert to a high-base numerical system to make it shorter
>said numerical system is based on basic characters to ensure that it takes as little space as possible; e.g. base 36 using 10 numbers and 26 letters
>transmit the text string instead of the image and rebuild on the other side (convert to characters and then to image format)

Alternatively I tried representing the text string as a very low quality image; I know what you're thinking, but the only requirement to make it light is to lower the quality to incredible levels. If the quality is too bad you wouldn't be able to read the 36-base numbers in the image, but the key is that you're gonna represent them as vectorial graphics; this way it doesn't matter if you represent a 1 as a short line or as a 10 mile long line, you can make them as big as they need to be in order to be clear in a low resolution image (mostly full of void) and the space they take is negligible. This technique works specially well in a few select cases, but in most of them transmitting the number itself is lighter.

There are many specifications regarding the optimal base for the representative number, the convention I use to map chars to numbers, and lots of other stuff that I will never tell to prevent you from stealing my idea.

(And to be a little more accurate, lossless compression treats everything like a sequence of symbols from a finite set, not necessarily just 1 and 0)


When you transmit text over the internet, it all turns into 1s and 0s. Same with sequences of high base digits, or anything else. And I can mathematically prove that no lossless compression algorithm exists which can make any input smaller. This is a straightforward result of the fact that there are fewer numbers with less than n bits than there are numbers with n bits, so there's no way to to uniquely assign each n bit number (ie, uncompressed data) a less than n bit number (ie, compressed representation).

base 36 is worse than base 256 which it is already stored in. (per byte)

>internet

That's where you're wrong. This runs over X.25. You probably think that running X.25 not-over-the-Internet is a shit idea, but if I told you that you can cut your company costs by 50% - 80% by migrating you would be doing it in a heartbeat. Therefore every major tech company will do it, and so will the users. This might very well mean the end of the IP.

>base 256

Retard. Go back to high school and learn what a base even is.

I am very interested in knowing if this algorithm (and other parts of the system) is already patented and can be licensed. Please contact [email protected] to discuss some prospects with no strings attached. We will know it's actually you when we talk a bit more about this technology. Please do it as soon as possible.

>Convert to text
>Less bandwidth
>Wtf is hex

Just hang yourself

LOL, you sound just like a snake oil salesman.
>Just switch to what I tell you and then sell to you and I guarantee that you will save money.
Fucking retard, you think somebody else (who obviously knows more about technology than you) hasn't already thought about these things and tried to come up with a viable solution?

Wtf is going, an actually funny thread on Sup Forums? Is this some parallel universe?

>Fucking retard, you think somebody else (who obviously knows more about technology than you) hasn't already thought about these things and tried to come up with a viable solution?

That's why everything is already invented right? Good goy.

So then open the image in a text editor you fucking retard. Why are you surprised that you get a bunch of junk and invalid characters?
Are you seriously this fucking retarded?

>Aqua fanart
You just keep continuing to prove your retardation.
Please get off your computer.

I like you OP. When you call others retards it really makes you look smarter than you are.

>this thread
Nef, is that you?

How do you think base36 numbers are represented when they get sent over the internet?

apt-get install wxhexeditor

ever heard of base64?