decoder

Upload of image failed: decoder jpeg not avail...

半腔热情 提交于 2019-12-09 14:41:54
使用django.modules 中image.save() 方法出现Upload of image failed: decoder jpeg not available错误,出现这个的原因时在linux 的 PIL中jpeg support 还没有装好 解决: 首先 卸载 PIL 如果有安装 pip uninstall PIL 然后 安装libjpeg sudo yum install -y libjpeg-devel 最后 安装 PIL pip install PIL 成功后会看到 -------------------------------------------------------------------- PIL 1.1.7 SETUP SUMMARY -------------------------------------------------------------------- version 1.1.7 platform linux2 2.7.3 (default, Sep 5 2013, 17:00:51) [GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] -------------------------------------------------------------------- *** TKINTER

Fastest way to draw a MediaCodec-decoded video frame to screen?

风格不统一 提交于 2019-12-09 11:46:58
问题 I'm looking for the fastest way to take an image frame received from the MediaCodec decoder and draw it to the Android device screen. The important constraints and explanations are: Cannot use MediaPlayer. No intermediate app allowed. Must draw output frames from the MediaCodec decoder to the screen as quickly as possible (minimize latency). The available decoder output formats are as follows: ColorFormat[0] 0x00000013 COLOR_FormatYUV420Planar ColorFormat[1] 0x00000015 COLOR

Decode all properties in custom init (enumerate over all properties of a class and assign them a value)

混江龙づ霸主 提交于 2019-12-08 10:19:46
问题 I'm currently working on a project that it's API isn't ready yet. So sometimes type of some properties changes. For example I have this struct: struct Animal: Codable { var tag: Int? var name: String? var type: String? var birthday: Date? } for this json: { "tag": 12, "name": "Dog", "type": "TYPE1" } But in development, the json changes to something like this: { "tag": "ANIMAL", "name": "Dog", "type": 1 } So I get some type mismatch error in decoder and nil object . To prevent decoder from

Get x,y position of a specific pixel

女生的网名这么多〃 提交于 2019-12-08 09:07:33
问题 I got a little problem, I got a code, that reads all pixels and takes the RGB color of the pixel. But before that, I cut the picture into chunks, so I can also calculate larger images, without exceeding memory. Here is the code: Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED); try { decoder_image = BitmapRegionDecoder.newInstance(filePath, false); } catch (IOException e) { e.printStackTrace(); } try { boolean bool_pixel = true; final int width = decoder_image.getWidth(

Using DirectShow filters outside DirectShow?

懵懂的女人 提交于 2019-12-08 03:31:05
问题 I'm currently dealing with Windows Media Foundation. However, due to some problems with the Microsoft H.264 decoder and some missing decoders for custom format, I'd like to know if it would be possible to instantiate a DirectShow Decoder directly using CLSID, and build a proxy around it that exposes IMFTransform to get a decoder for Media Foundation. So here is my question: Can i instantiate a Directshow filter (preferrably decoders) directly and use them for decoding (i.e. put some

Netty ByteToMessageDecoder can't be @sharable

China☆狼群 提交于 2019-12-08 00:08:27
问题 I use MyDecoder which extends ByteToMessageDecoder to get Message from the socket Stream. It works fine in one thread. But in more threads, the netty has reported 'the handler should be sharable' However, I search in netty api, the ByteToMessageDecoder can't be @sharable, so how can I use it in multi thread. 回答1: Create a new instance in your ChannelInitializer. 来源: https://stackoverflow.com/questions/26559829/netty-bytetomessagedecoder-cant-be-sharable

How to write a base64 decoded png image to file?

孤街浪徒 提交于 2019-12-06 16:50:15
I try to write a base64 png image to file with following code: imageReader := base64.NewDecoder(base64.StdEncoding, strings.NewReader(Images[i])) pngImage, _, err := image.Decode(imageReader) if err != nil { beego.Error(err) } bounds := pngImage.Bounds() if imgFile, err = os.Create(fileName + ".png"); err != nil { return Data{} } defer imgFile.Close() _, err = imgFile.Write([]byte(pngImage)) The bounds are ok. The error message for the last line is cannot convert pngImage (type image.Image) to type []byte Obviously, because an image.Image is not a byte[]. But how can I convert it? Or is there

Morse Code Converter in C

泄露秘密 提交于 2019-12-06 16:28:51
问题 Yes its homework We were suppose to have char 2D array holding character with size limit of 255 char char string[100][255]; Program neede: change the input morse code by a user to alphabet/English letter (Capital Letters) Sample Input 2 .... . .-.. .-.. --- / .-- --- .-. .-.. -.. .--- --- -.- . Sample OutPut Case#1: HELLO WORLD Case#2: JOKE My only idea is to have the first characters of a word that is inputed by the user.. to be.. checked if its '.' or '-' then scrupulously and manually

Using DirectShow filters outside DirectShow?

巧了我就是萌 提交于 2019-12-06 11:33:43
I'm currently dealing with Windows Media Foundation. However, due to some problems with the Microsoft H.264 decoder and some missing decoders for custom format, I'd like to know if it would be possible to instantiate a DirectShow Decoder directly using CLSID, and build a proxy around it that exposes IMFTransform to get a decoder for Media Foundation. So here is my question: Can i instantiate a Directshow filter (preferrably decoders) directly and use them for decoding (i.e. put some compressed frames and get uncompressed ones) to create a MFT? I know how to instantiate the filter itself using

Is there any free or commercal jpeg decode which is really fast [closed]

醉酒当歌 提交于 2019-12-06 05:13:41
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 6 years ago . I am using c++, libjpeg for decoding jpeg file. I find it is not fast enough, is there any method to make it faster by setting some compile parameter? or are there any other lib can open jpeg files more faster?