Questions tagged [format-conversion]

This tag is applied to questions about conversion data from one format to another.

96 questions
174
votes
14 answers

Convert XML to JSON (and back) using Javascript

How would you convert from XML to JSON and then back to XML? The following tools work quite well, but aren't completely consistent: xml2json Has anyone encountered this situation before?
Jason Suárez
  • 2,445
  • 3
  • 18
  • 20
31
votes
6 answers

Extract black and white image from android camera's NV21 format

I have done some google-ing around and couldn't find enough information about this format. It is the default format for camera preview. Can anyone suggest good sources of information about it and how to extract data from a photo/preview image with…
Ethan
  • 1,488
  • 3
  • 19
  • 24
24
votes
15 answers

Convert DD (decimal degrees) to DMS (degrees minutes seconds) in Python?

How do you convert Decimal Degrees to Degrees Minutes Seconds In Python? Is there a Formula already written?
David
  • 241
  • 1
  • 2
  • 4
15
votes
3 answers

How to read .npy files in Matlab

I was wondering if there is way to read .npy files in Matlab? I know I can convert those to Matlab-style .mat files using scipy.io.savemat in Python; however I'm more interested in a native or plugin support for .npy files in Matlab.
John Manak
  • 13,328
  • 29
  • 78
  • 119
8
votes
4 answers

xml to json mapping challenge

At first glance, I thought using xml data in javascript would be as simple as finding an xml-to-json library and turning my xml into a javascript object tree. Now, however, I'm realizing that it's possible to create structures in xml that don't map…
morgancodes
  • 25,055
  • 38
  • 135
  • 187
8
votes
2 answers

c# extract mp3 file from mp4 file

is there any easy way of extracting a mp3 file from a mp4 file? I've already tried to change the file extension, but that won't let me to edit the mp3 description. thank you!
Robert JR
  • 91
  • 1
  • 1
  • 3
7
votes
2 answers

Converting html to json with pandoc

I'm trying to take html and generate some json that keeps the same structure. I'm trying to use pandoc, as i've had some success in transforming things from format A to format B using pandoc before. I'm trying to convert this…
Loïc N.
  • 353
  • 3
  • 17
6
votes
4 answers

How to use papa-parse-angular2

Want to use papa-parse-angular2 to convert CSV to JSON. Didn't find any example so I do it like this. app.module.ts import {CSVService} from 'papa-parse-angular2'; @NgModule({ providers: [ CSVService, ... xx.component.ts constructor( private…
brewphone
  • 1,316
  • 4
  • 24
  • 32
6
votes
1 answer

RGB to YCbCr Conversion problems

i need convert RGB image to YCbCr colour space, but have some colour shift problems, i used all formulas and got the same result. Formula in python cbcr[0] = int(0.299*rgb[0] + 0.587*rgb[1] + 0.114*rgb[2]) #Y cbcr[1] = int(-0.1687*rgb[0] -…
Runnko
  • 61
  • 1
  • 3
5
votes
1 answer

How to convert AudioBuffer to wav file?

I'm trying to convert an AudioBuffer into a wav file that I can download. I tried 2 methods: The first one, I record all the sounds going threw a mediaRecorder and do this: App.model.mediaRecorder.ondataavailable = function(evt) { // push each…
5
votes
1 answer

Convert xml to json without conversion String/Integer?

I would like to convert XML to JSON. Currently, I make this with the lib org.json : JSONObject jso = XML.toJSONObject(xmlStr); However, if the XML contains number fields, I would like to have only String fields in the JSONObject. For example: The…
J.Canonne
  • 121
  • 1
  • 5
5
votes
3 answers

Displaying OpenCV iplimage data structures with wxPython

Here is my current code (language is Python): newFrameImage = cv.QueryFrame(webcam) newFrameImageFile = cv.SaveImage("temp.jpg",newFrameImage) wxImage = wx.Image("temp.jpg", wx.BITMAP_TYPE_ANY).ConvertToBitmap() wx.StaticBitmap(self, -1, wxImage,…
Dom M.
  • 3,762
  • 8
  • 32
  • 40
4
votes
4 answers

API for document format conversion

I am looking for a RESTful web service to which I can send a document (doc, docx, xls, xlsx, ppt, pptx, and tiff at a minimum) for conversion to pdf and swf. The reason I need swf in addition to pfd is so that I can display the document in the…
4
votes
0 answers

Converting MP3 to PCM and playing it back in Android

I am trying to convert an mp3 file to pcm file and trying to play it. I want the values as int16. I was able to successfully convert it using MediaCodec and MediaExtractor in android. And i was able to play it back normally(I had to change the…
4
votes
4 answers

Converting a big integer to decimal string

At the risk of having this question voted as a duplicate, or even to have it closed, I had this question has come up. Background In "normal" data types such as int, long long, etc..., to convert from the binary numeric value to a decimal string, you…
Daniel Rudy
  • 1,411
  • 12
  • 23
1
2 3 4 5 6 7