Questions tagged [format-conversion]

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

86 questions
153
votes
13 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,195
  • 2
  • 16
  • 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,438
  • 3
  • 18
  • 24
18
votes
11 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
  • 181
  • 1
  • 1
  • 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
  • 12,620
  • 27
  • 73
  • 114
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.
  • 193
  • 1
  • 14
6
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
  • 24,113
  • 35
  • 128
  • 186
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
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,092
  • 3
  • 18
  • 28
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,…
Domenic
  • 3,552
  • 8
  • 29
  • 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
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…
4
votes
1 answer

YUY2 vs YUV 422

I am having trouble understanding the exact difference between the two. From research, more discuss the two as being different but a few seem to group them under the "4 2 2" sampling scheme. YUV 422 (I and J versions): "has one luma plane Y and 2…
DragonDance27
  • 87
  • 1
  • 10
4
votes
1 answer

get pure text form odt file in console

I am looking for a small linux tool that would be able to extract text from odt file. It just needs to be human-readable and it can have problems with complicated objects etc. It's almost a duplicate of this question but I need it to be small and…
naugtur
  • 16,479
  • 5
  • 65
  • 107
4
votes
0 answers

Which would be faster for pixel format convertion? Pixel shader or compute shader, or maybe OpenCL?

I want to convert frames from YUV420p format(or something like that) to ABGR format on the fly, and put the result frames in video memory as textures. There are two ways I can think about now: Let each channel be a source texture, and render to…
BlueWanderer
  • 2,546
  • 2
  • 19
  • 35
1
2 3 4 5 6