file-format

What's Is the Best File Format for Configuration Files

怎甘沉沦 提交于 2019-11-28 05:04:55
I am creating a framework in PHP and need to have a few configuration files. Some of these files will unavoidably have a large number of entries. What format would be the best for these config files? Here is my quantification of best: Easily parsed by PHP. It would be nice if I didn't have to write any parsing code but this is not a deal breaker. Remains easily read by humans even when there are a large amount of entries Is a widely used standard, no custom formats Succinctness is appreciated I started out using XML, but quickly gave up for obvious reasons. I've thought of JSON and YAML but

Read .img medical image without header in python

∥☆過路亽.° 提交于 2019-11-28 01:22:33
问题 I have a radiograph .img file without the header file. However, the researchers who have published the file have given this information about it High resolution (2048 × 2048 matrix size, 0.175mm pixel size) Wide density range (12-bit, 4096 gray scale) Universal image format (no header, big-endian raw data) I am trying to open the file using Python but unable to do so. Could someone suggest any method to read this image file? 回答1: I found some radiograph images, like yours, by downloading the

Which format for small website images? GIF or PNG? [closed]

霸气de小男生 提交于 2019-11-27 21:49:33
When doing small icons, header graphics and the like for websites, is it better to use GIFs or PNGs? Obviously if transparency effects are required, then PNGs are definitely the way to go, and for larger, more photographic images I'd use JPEGs - but for normal web "furniture", which would you recommend and why? It may just be the tools I'm using, but GIF files usually seem to be a bit smaller than a comparible PNG, but using them just seems so 1987. As a general rule, PNG is never worse, and often better than GIF because of superior compression. There might be some edge cases where GIF is

Extracting text from garbled PDF [closed]

社会主义新天地 提交于 2019-11-27 20:17:44
I have a PDF file with valuable textual information. The problem is that I cannot extract the text, all I get is a bunch of garbled symbols. The same happens if I copy and paste the text from the PDF reader to a text file. Even File -> Save as text in Acrobat Reader fails. I have used all tools I could get my hands on and the result is the same. I believe that this has something to do with fonts embedding, but I don't know what exactly? My questions: What is the culprit of this weird text garbling ? How to extract the text content from the PDF (programmatically, with a tool, manipulating the

Can a CSV file have a comment?

谁说胖子不能爱 提交于 2019-11-27 18:54:17
Is there any official way to allow a CSV formatted file to allow comments, either on its own line OR at the end of a line? I tried checking wikipedia on this and also RFC 4180 but both do not mention anything which leads me to believe that it's not part of the file format so it's bad luck to me and I should then use a seperate ReadMe.txt file thingy to explain the file. Lastly, i know it's easy for me to add my own comments in, but i was hoping that something like Excel could just import it straight away with no need for a consumer to have to customize the import process. So, thoughts? The CSV

Recommended 3D model type for in-game character model, loaded manually?

僤鯓⒐⒋嵵緔 提交于 2019-11-27 18:19:56
问题 I'm writing a game in JOGL and need to represent the in-game character. I plan to use skeletal animation for the character movements, and of course the character will be skinned. I can't seem to find any good model loaders for JOGL so I plan to load the filetype myself, based on specs or something. I also plan to use Blender as my 3D modeler, so some type that exists in there would be best. What filetype do you recommend I use? .blend? .x, .3ds, .md2/3/5, ...?? Remember I'd like something

How do I distinguish between 'binary' and 'text' files?

六月ゝ 毕业季﹏ 提交于 2019-11-27 17:48:01
Informally, most of us understand that there are 'binary' files (object files, images, movies, executables, proprietary document formats, etc) and 'text' files (source code, XML files, HTML files, email, etc). In general, you need to know the contents of a file to be able to do anything useful with it, and form that point of view if the encoding is 'binary' or 'text', it doesn't really matter. And of course files just store bytes of data so they are all 'binary' and 'text' doesn't mean anything without knowing the encoding. And yet, it is still useful to talk about 'binary' and 'text' files,

Reading PSD file format

对着背影说爱祢 提交于 2019-11-27 17:37:18
I wonder if this is even possible. I have an application that adds a context menu when you right click a file. It all works fine but here is what I'd like to do: If the file is a PSD then I want the program to extract the image. Is this possible to do without having Photoshop installed? Basically I want the user to right click and click "image" which would save a .jpg of the file for them. edit: will be using c# Thanks Well, there's a PSD plugin for Paint.NET which I think is Open-Source which you might want to take a look at for starters: http://frankblumenberg.de/doku/doku.php?id=paintnet

What is the difference between “JPG” / “JPEG” / “PNG” / “BMP” / “GIF” / “TIFF” Image?

折月煮酒 提交于 2019-11-27 10:05:50
I have seen many types of image extensions but have never understood the real differences between them. Are there any links out there that clearly explain their differences? Are there standards to consider when choosing a particular type of image to use in an application? What do we use for web applications? coobird Yes. They are different file formats (and their file extensions). Wikipedia entries for each of the formats will give you quite a bit of information: JPEG (or JPG, for the file extension; Joint Photographic Experts Group) PNG (Portable Network Graphics) BMP (Bitmap) GIF (Graphics

When are files “splittable”?

a 夏天 提交于 2019-11-27 06:16:05
问题 When I'm using spark, I sometimes run into one huge file in a HIVE table, and I sometimes am trying to process many smaller files in a HIVE table. I understand that when tuning spark jobs, how it works depends on whether or not the files are splittable . In this page from cloudera, it says that we should be aware of whether or not the files are splittable: ...For example, if your data arrives in a few large unsplittable files... How do I know if my file is splittable? How do I know the number