weixin_33726318 2014-06-09 16:04 采纳率: 0%
浏览 7

Ajax发布图像颜色数据

I have a large array of 76800 color values (320px x 240px image). I have tried posting a single array of these values, but it just seems to be far too big. Is there any way to format this array as to shrink the size and post it in a simple format so I can extract the data?

The array is multidimensional with each entry looking like:

["14140603","14337981","13879745","13748159","13812668","13944509"...
  • 写回答

1条回答 默认 最新

  • weixin_33747129 2014-06-09 16:16
    关注

    Best method i can think of without refactoring a load of your application code would be to see if compressing the array helps.

    http://pieroxy.net/blog/pages/lz-string/index.html

    That library implements LZW compression in javascript. You will ofcourse need to turn your multi-dimension array to a string first. Probably the best way is to turn the array to a JSON string, then compress it. Most languages will have a JSON library and a plethora of compression libraries. So you shouldn't have any difficulty, decompressing an reinflating the array back for processing server side.

    There's other methods you could take, including reconfiguring your server (which could open you up to vulnerabilities), or you could implement a custom chunked upload approach. But if the compression method works, it will be the quickest to implement and the most robust.

    评论

报告相同问题?

悬赏问题

  • ¥15 逻辑谓词和消解原理的运用
  • ¥15 三菱伺服电机按启动按钮有使能但不动作
  • ¥15 js,页面2返回页面1时定位进入的设备
  • ¥200 关于#c++#的问题,请各位专家解答!网站的邀请码
  • ¥50 导入文件到网吧的电脑并且在重启之后不会被恢复
  • ¥15 (希望可以解决问题)ma和mb文件无法正常打开,打开后是空白,但是有正常内存占用,但可以在打开Maya应用程序后打开场景ma和mb格式。
  • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝
  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
  • ¥15 错误 LNK2001 无法解析的外部符号