当前位置: 首页 > 知识库问答 >
问题:

将字符串(0 x…)从mssql转换为html格式的图像

胡新
2023-03-14

我正在尝试将数据库中的所有字符串转换为图像。这是一个例子:

0x000941410000000000000000000000004F4D4E49534A504547FFD8FFE000104A46494600010100000100010000FFDB004300080606070605080707070909080A0C140D0C0B0B0C1912130F141D1A1F1E1D1A1C1C20242E2720222C231C1C2837292C30313434341F27393D38323C2E333432FFDB0043010909090C0B0C180D0D1832211C213232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232FFC000110800B8007D03012200021101031101FFC4001F0000010501010101010100000000000000000102030405060708090A0BFFC400B5100002010303020403050504040000017D01020300041105122131410613516107227114328191A1082342B1C11552D1F02433627282090A161718191A25262728292A3435363738393A434445464748494A535455565758595A636465666768696A737475767778797A838485868788898A92939495969798999AA2A3A4A5A6A7A8A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5C6C7C8C9CAD2D3D4D5D6D7D8D9DAE1E2E3E4E5E6E7E8E9EAF1F2F3F4F5F6F7F8F9FAFFC4001F0100030101010101010101010000000000000102030405060708090A0BFFC400B51100020102040403040705040400010277000102031104052131061241510761711322328108144291A1B1C109233352F0156272D10A162434E125F11718191A262728292A35363738393A434445464748494A535455565758595A636465666768696A737475767778797A82838485868788898A92939495969798999AA2A3A4A5A6A7A8A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5C6C7C8C9CAD2D3D4D5D6D7D8D9DAE2E3E4E5E6E7E8E9EAF2F3F4F5F6F7F8F9FAFFDA000C03010002110311003F00F7FA28AC4F12788534182DC2C266B9BA93CA8231DCE3A9F61C7E7401B75567D46CADBFD7DDC319E98671586F68D7722B6A37534F20EB1C5279710F5181C9FC6AFBC51C71A88ADE20BD72AA09E3D4D005AFED7D3F207DB22E7FDAA4FED9D378CDE4433D32D8AE4F56BEB7B791B7DDC68DFDD6600F3F8FB9AE66F75AB18A40AB730938E7E6F5CE6803D43FB734AFFA085BFF00DFC156A2B9B7B95FDCCE92023F81F9FD2BC325D4A227FE3E6262CC780D9CF71DFF004F7A61BA910C8F14ECBF2F055B18EF401EE361A741A6C2D140F74EACDB89B8BA9276CFB1919881EDD2ADD78469FE2ED634F943477723A93F75C96FC3FCFA9AF4CF06F8C0789229619E3115DC3F780FBAC3D45007574514500145145001451450015E77F14A57B59340BB1811C372C5890783F2E3F91AF44AE4BE2469A752F065D6D20496CCB3A92718C707F42680258269259804504C806DF6C8EF4EF11680975E16D45599DAF3ECAED1BAB95C385C8C0078E40ACAD1677934CD3EECCC43AC28C41C7380339AEE7E5923F5561FA1A00F97AD6E26BA895E593CE7207CF20DD938EC7B1CD5EF318C8164CED030C0B76F53ED544C31DAEA57B6D17FAA82E9E246CF255588E7F2C55863990B1039192BDC0EDCFF0085004EAB13AF091EE2E4659013FA57AD5AFC3EF0EEABA15A4EB686DAE6480379D048CA4395FBD8CE0D78F43CA246172C5BEE93FE7FCE2BE84F0B36FF000B69A7FE9828FCA803C47C4BA06A3E17D516D2F18DCC0EB9B7B90BFEB00EA08ECDEDE95A5F0F6E0C7E28B50265024250807961D4576DF166DBCDF0D5A4D961E4DE21DCBD81057FAD79EF83A3583C4FA6BFDE2B38556E98CF518A00F7FA28A2800A28A2800A28A2800ACED7AD0DFE817F6A3399607518EB9C568D1401E5BE0FBAFB4E86610496818A115E93A7BEFD3ADDBD6353FA5797690C34FF00116BB64BF705C3145CF1C123FC2BD0FC3B742E34ED9BF718CE3F03C8A00F03F14590D37C75AD5A6DF2D1AE0CA0AE78DE3703FAD57EA1B77A63A678FF00F5FF002AEABE2E4115BF8DED6600ABDC5AA166F521980FE42B95C9DEC46067A1DBC1FAFA50004BEE8D3AE0EE0D8C92DE9ED5EF5E0760FE0ED3C818C2918F4F98F15E0E9B5990154DBB8E580DBCD7BA7805B7783ACFA7DE9071DBE76A00A1F14B8F0548DD96E21247A8DD5E5BE1C9443AF581C960D3AE1BD79AF54F89EACDE0A9F6807F7D1E41C631BABC9B446C6B160D929899786391D7FC8A00FA2E8A4072A0FA8A5A0028A28A0028A28A0028A28A00F20F1427F65FC429496DAB7481C10A7A3718FCC1FCC5763E0ABA494DE4592586D233E8322B9CF8A11A26BDA3CD92AC5581238E87D7F134EF04DDF97E238D377CB2C6D19E08E47207E86802AFC67B40B268DA808F2DB9E0639C67A3007FF1EFCEBCFB1F346D85CB0E1B071D3F535EB7F186D84BE073371BADEE6371F89C1FD0D78E44FB8282E5B70C0EDFE4500590576640D8430CEE5C9CE7F4AF74F008C7836C72CADF7F9031FC66BC11642A9B83606FC1C0FF0039ED5EEFF0F5CB783EDC7185924031D3EF1A008BE25ED1E08BA66190B2467FF1E15E33A5B6CD52DE401BE59411EDCF535EC9F13723C0F764120878CF5C7F10AF13B138BCB57049DB286E3AF5E9401F4D4673121F5029D4C84E618CFF00B23F953E800A28A2800A28A2800A28A2803CEFE29C5FE8F633838605D7F91AE7BC1F728DE29D2D49018B1032D9E3637F8574FF0015830D06DDD573B5DB3CE3B570FE0360DE2CD24903717638E9FC0DFAD007A17C558DA4F00DD95CFEEE489CE3AE038AF0B81F7A03B9806EA07F5EFDABE86F1DC1F69F03EAF1E327C82C3EA083FD2BE72B572231B8E48C8FA8FF000A00BBF7917E76251BF11CF38F7EB5EEFF000E548F06DB6707324878FF0078D780EE2A53FDEC8C9C1EDFAD7BF7C376DFE06B16DC092D2671D07CEDC50037E24E3FE108BC24818643CFFBC2BC2ACC6C9E125369570CA54F5E78AF72F89CFB3C0D75904832460E0E3F88578559616EED411B7F7839C76CD007D416E736D11FF607F2A96990FF00A88FFDD1FCA9F400514514005145140051451401E7FF0016240BA15BA8C162EC7AF38C579B7867568748D774FBEB926586062485EBCA11C5779F175FFD16D50123E46638EE38AF219236568598119F9863191C7AFA5007A46B9F12AEB55B2BAB38AD6D61B59D0C44392CE41EF9040E9ED5C0C569042EA111D8A83D0E73FE7DAA8872A87F7C4E1B0CA4641FD7FC2ADC578DE691B71D30A46334016D2C4ED4C42AAACF90D8E056F69DAA6AD616BF67B5D4AE218158ED8A393685CF24FE66B0E2BC936C1F290065B8EDCFF2AB6976D97063CB9E33EFDFF1FF001A00D6B8BFD4F5383C8BCBFB9B9B704318E6938247F9F7AA16FA75B8962DA88ADBB706FEE907D3EBC54715E7CEC07CDE99E31C7A5345F80917CDC13C6392067D31401DD5AF8EB5A8A1DAE6DA4C36D0D24678FC88AB90FC44BE4389ECADE4E7AC6C578E99E73DF35E7435289216FDE9FBF82B8E3AFF00F5A9C353B7F98094AFCBF7187DEF63F5CD007AD5A7C41D32651F688A685FB803781F88AD9B1F12693A82130DE46A41C1594EC23F3AF0B1AA40854B1C337CC30071F5A4FED9842FCA00F9BD39C7AFF9F4A00FA2A8AF24F0B78F9EDAF92D2EE779AD890B86E5949E9C9FE55EB740051451401E5DF175D4358A83893CB90E7DB8AF39D8B22C60900B281DB938F4AEDFE2D4DBF588A219CA5BFAF7393C533E1269D6D7F73ABBDC5AACD17931C5891772F249231D3A8A00E025B11F2B2B055270531D7FC9AA72249197CA3676955E0E430F4C57B8EBFF000D2CAEE332E8E56D2603FD531263739FC48FC2BCAF57D2EEF46D426B1BE8CC771B43121F2307A118F5C1FCA8039FFB6BA2165DCA01E9D475A57BD690313E6751BB00B6EFF38AD1B45F318650BA9006DC6413EF5A096D732A98E2B7B876C83B44670C3DF8A00E731772386582420E551B67E5F8D48B697F2AC4E532719FBD81D6BA0BAB29ACE2DD796D25BA48488CCB1955E3D2A3B246BA9EDE08374F24CFB110107737D3F5A00C45B4BD2AEA628C93D4E41079EB569347BA770CD3C4A78DBD4FF4AEE6CFC11E22914674DD801CFEF24519FD6B4D7E1DEB477B3A59B123237CC739FC071401E78BE1F93CE8C25DA8529F2B6CE33EDCF5FAD4A9A061774D752798ADC9451CF439FE75E910FC3AD519C799736B126318CB3E39EDC0AD1FF8574896A4BEA2E64504F118C13F89A00F36B5D1ED20D52C5C248E44E98663F78641E457D0B5F39E8B7F737DE28B482440116751951D7E6F4FF3D6BE8CA0028A28A00F0EF89D309BC4B3A06FB815719C1E82B7BE0C0510EB7B4F3E643907FDD6AE47E204FBFC49A80623689597E8738AEC7E0B43B74AD566E32D3A21007F757FFB2A00F50AF11F89F8FF0084C270FC29B78B04763CF5AF6EAF14F89871E339B90336F1039FC6803B2F8591467C23BCC6A5CDC3FCD8FA57735C57C2DFF9143920FF00A4C9CE739E95DAD007987C6794AE99A5A648532BB1F4E00FF1AE0FC09134DE3AD2481829267A7518AEC7E33C9FBDD2E3C29C248D93D79C67F95737F0C3E7F1CD8A7076C721E7B7CA78A00F7EA28A2800A46FBA71E94B45007CE5E16895BC6F6A37119BD0001D33BEBE8DAF9E3C2586F1DDAB051B4DE80063FDBE6BE87A0028A28A00F9E3C7071E27D558E36F9CFB88E0F53FD2BD2FE11C263F0579840CCB752371ED85FF00D96BCAFC5844BE21BF948C9333F20F0793D3D2BDA3E1DC1F67F0369ABB71B959FEB96273401D457887C4FE3C673F395FB34448FCF9CF6AF6FAF14F89E0FF00C25B38E71F678B233D4722803B5F85600F06803FE7E1F3EFD2BB6AE33E180C78448C93FE92F8C9CF615D9D0078EFC64C3EAD648541C5B13D79E58D66FC2788C9E320E07CB1DB3B723D703FAD59F8B40CBE2251D92055EBF8FF005A93E10424F892F242384B5383F561C5007B3D145140051451401F3DF84016F1FD99C12BF6B207B61ABE84AF04F0520FF84F2D73963F68739FC4D7BC9DD9E31F8D003A9188552C7A019A5A82F9B669F72E3AAC4C7F43401F35EA9309352BA7F293779AC5B249CF3D6BDFFC1BB7FE10DD2362ED5FB2A606738E2BE7A68CCF33B8F98EEC920F0C39FF003F8D7D17E17B6367E16D2EDD860C76C831E9C5006B578AFC4E751E2D972172208B9E738E735ED55E2BF13F70F174A540DC6DE30A71D7AF1401DBFC30C7FC2247000FF497C819F41EB5D9D713F0B011E0F39DBCDCBE36FD0576D401E1DF13E6CF8BE6DA54158D01CF7E2B67E10206D435490A28610C63E5CF727FC2BB5D53C0DA16B17D2DE5E412B4F263732CCCB9C71D8D59D07C2BA5786DA73A6C5247E7ED0FBA466E99C633D3A9A00DAA28A2800A28A2803C3FC22A17E21C51B22EF8EE24071F538AF70AF17F0D4613E28BC63385BA9B047F10E7F3AF68A0029080C0820107820D2D140156DB4CB0B324DAD8DB405BA98A255CFE42AD51450015E2DF1377AF8BE4F90B06822C01DFAF15ED35E2DF140C87C56CA0F1E4C7B793D79FCA803B6F860853C2454925BED2F9C8C73815D9D717F0BD8B7847E62C48B87196CFA0F5AED2800A28A2800A28A2800A28A2803C7FC3D1B0F8AD38C118BB9CF2B8C0E78AF60AE2ECBC177969E3A935C37B1BDABC8F288C83BD4B0231E98E6BB4A00C383C57A7CD6315D797767CC66531DB406F1A323070E6DFCC5525595864F2187BD2FF00C257A77FCFB6B1FF00826BBFFE354514744FBA4FEF401FF095E9DFF3EDAC7FE09AEFFF008D51FF00095E9DFF003EDAC7FE09AEFF00F8D5145001FF00095E9DFF003EDAC7FE09AEFF00F8D5799F8EA1B9D5BC40DA858D8EAD35BBC489B5749BA0EA467270621EA28A2803A4F016AE9A47875AD750B0D6619BED0EC17FB1EECFCA40E788CFBD74CFE2CB008C56D7582C0703FB1AEF93FF007EA8A28030BC27E3EBED574E9A6F10F86B57D1EE5652A908D3AEA6DE980776445C7248C7B56FFF00C257A77FCFB6B1FF00826BBFFE354514007FC257A77FCFB6B1FF00826BBFFE3547FC257A77FCFB6B1FF826BBFF00E354514007FC257A77FCFB6B1FF826BBFF00E3547FC257A77FCFB6B1FF00826BBFFE354514007FC257A77FCFB6B1FF00826BBFFE3547FC257A77FCFB6B1FF826BBFF00E35451401FFFD9

我不明白如何转换它。这不起作用:

<img src="data:image/gif;base64,...

这是Base64吗?还是另一种格式?我怎么把这个转化成图像呢?

共有1个答案

唐烨煜
2023-03-14

这不是base64它的十六进制,因为字符串以0xs开头。您可以尝试此链接来实现您的目标

 类似资料:
  • 问题内容: 我有一个包含HTML标记的字符串变量。该HTML标记基本上表示电子邮件内容。 现在,我想从该字符串内容创建一个图像,该图像实际上包含HTML标记。我不想通过将这些内容写入它们来创建HTML文件。我只想使用此字符串创建图像文件。 这是我所拥有的: 如何从该字符串内容创建图像? 问题答案: 感谢大家的回应。我使用HtmlRenderer外部dll(库)来实现相同目的,并在下面的代码中找到了

  • 问题内容: 我想将以下HTML转换为Python中的PNG图像。 该HTML当然是一个示例。 我尝试过“比萨”,但是它将html转换为PDF,而不转换为图像。我可以将HTML转换为PDF,然后将PDF转换为PNG,但是我想知道是否有任何直接的解决方案(即HTML转换为PNG)。任何内置或外部模块都可以正常工作。 如果可以在Graphicsmagick或Imagemagick中完成,那将是完美的。

  • 问题内容: 如何使用PEM格式的字符串创建实例?PEM格式的字符串是HTTP请求“ SSL_CLIENT_CERT”标头值。 答案 : 根据mgaert的回答,这是我在Scala中写的内容 : 问题答案: 将Base64解码为二进制,并用一些InputStream读取它,然后尝试

  • 问题内容: 我想要这种格式 问题答案: 您需要先 解析 日期字符串(使用方法),才能 使用与格式匹配的格式获取对象。 然后使用所需的格式来 格式化 Date对象(Use 方法)以获取字符串。 输出:- 第一种格式是RFC 822 TimeZone与您的日期字符串匹配。有关在日期格式中使用的其他各种选项,请参见。

  • 问题内容: 有这样的字符串。 我想将其转换为确切的日期时间格式,以将其存储在SQL中。 熟悉如下所示的许多字符串到日期的转换。 但是我需要将 带有时间戳的字符串转换为其日期格式。 谁能解释将其转换为java.util.Date格式的正确方法。 问题答案: 试试这个: 为了将来的参考,请阅读SimpleDateFormat类:http : //docs.oracle.com/javase/7/doc

  • 如何转换字符串列表 我正在使用NewtonSoft.json。 任何帮助都将不胜感激。